Understanding TCP Transmission Control Protocol

comp2322 lab 6 tcp n.w
1 / 18
Embed
Share

Explore the basics of TCP Transmission Control Protocol, including TCP segment structure, reliable data transfer, connection establishment, data transfer, and connection termination. Learn about the three-way handshake, packet capture, and more in this comprehensive overview of TCP. Discover how TCP ensures reliable data delivery and the correct order of bytes, making it a vital protocol for communication over the internet.

  • TCP Protocol
  • Network Communication
  • Data Transfer
  • Reliable Transmission
  • Three-way handshake

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. COMP2322 Lab 6 TCP Steven Lee Mar 29, 2017

  2. TCP Transmission Control Protocol Transport layer protocol User Datagram Protocol (UDP) is another one 2

  3. TCP segment structure 0 1 2 3 Bit 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 Source port Destination port 0 Sequence number 32 Acknowledgement number A C K N N 64 S Y F I Window size 96 Checksum 128 Options (variable length) Application data (variable length) 3

  4. TCP Point-to-point One sender, one receiver 4

  5. TCP segment structure Source port Destination port 0 5

  6. TCP Reliable All bytes sent are guaranteed to be received identically, and in the correct order 6

  7. TCP segment structure Sequence number 32 Acknowledgement number A C K N 64 S Y Sequence number The accumulated sequence number of the first data byte of this segment for the current session Acknowledgement number The next sequence number the receiver expects The receiver acknowledges receipt of all prior bytes 7

  8. Connection establishment Three-way handshake Host B Host A 8

  9. Data transfer Host Server 9

  10. Connection termination Four-way handshake Host B Host A 10

  11. Practice 1 Capture packets while downloading http://www4.comp.polyu.edu.hk/~cswklee/TCP/5000.t xt To reveal information of packets that say [TCP segment of a reassembled PDU]: Right-click on any TCP layer Protocol Preferences Uncheck Allow subdissector to reassemble TCP streams To reveal the application data contained in the TCP segments: Analyze Enabled Protocols Uncheck HTTP OK 11

  12. Practice 1 Question 1 (4 marks) a) What is the TCP port number used by your computer to transfer the file? b) What is the TCP port number used by the server to receive the file? Question 2 (4 marks) a) What is the sequence number of the TCP SYN segment that establishes the TCP connection between your computer and the server? b) What indicates that the segment is a SYN segment? 12

  13. Practice 1 Question 3 (6 marks) a) What is the sequence number of the SYN/ACK segment that the server responds the SYN with? b) How about its acknowledgement number? How does the server determine this value? c) What indicates that the segment is a SYN/ACK segment? Question 4 (4 marks) a) What are the sequence numbers of the data- containing segments in the TCP connection related to the file transfer? b) What is the length of each of them? 13

  14. Practice 1 One way to view the round-trip time (RTT) of the TCP segments: Right-click on any column s header Column Preferences Click the add button Enter tcp.analysis.ack_rttinto Field Name OK Question 5 (2 marks) What is the RTT of each of the data-containing segments? 14

  15. Practice 2 Download and open a modified packet capture from http://www4.comp.polyu.edu.hk/~cswklee/TCP/piggyba cking.pcap 15

  16. Practice 2 The packet capture shows a partial interaction between a client and a TCP server. After a normal TCP three-way handshake, the client begins data transfer to the server. Instead of sending a pure TCP ACK to the client, the server sends the acknowledgement along with the data (the acknowledgement is piggy-backed on the data). This is known as piggybacking. Question 6 (6 marks) a) What is the payload size of the TCP data packet sent from the server? b) What is the TCP/IP overhead? c) Assume the sizes of the TCP and IP headers remain unchanged. How much more TCP/IP data would the server need to transmit if piggybacking is not used? 16

  17. Practice 3 Download and open a modified packet capture from http://www4.comp.polyu.edu.hk/~cswklee/TCP/GFW.pc ap 17

  18. Practice 3 The packet capture shows that the Great Firewall (GFW) injects a series of forged TCP Reset (RST) packets upon seeing a request with blacklisted keywords, i.e. falun Question 7 (6 marks) a) How many TCP RST packets are injected by the GFW? b) What is the difference of the sequence numbers between each subsequent TCP RST packet? What is special about this number in TCP? c) Why does the GFW inject TCP RST packets with these specific sequence numbers? 18

Related


More Related Content