Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.

Similar presentations


Presentation on theme: "TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr."— Presentation transcript:

1 TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr urgent data checksum F SR PAU head len not used options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection establish (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

2 Host AHost B SYN, Seq_no = x SYN, Seq_no = y, ACK, Ack_no = x+1 Seq_no = x+1, ACK, Ack_no = y+1 Figure 8.22 Establish Connection

3 Host AHost B SYN, Seq_no = n SYN, Seq_no = n, ACK, Ack_no = n+1 Seq_no = n+1, ACK, Ack_no = n+1 Delayed segment with Seq_no = n+2 will be accepted Figure 8.23 Establish Connection – Problem of Delayed Segment

4 Host A (Client) Host B (Server) SYN, Seq_no = x SYN, Seq_no = y, ACK, Ack_no = x+1 Seq_no = x+1, ACK, Ack_no = y+1 socket bind listen accept (blocks) socket connect (blocks) connect returns accept returns read (blocks) write read (blocks) read returns write read (blocks) read returns request message reply message Figure 8.24 Data Transfer

5 Host AHost B Seq_no = 2000, Ack_no = 1, Win = 1024, Data = Seq_no = 1, Ack_no = 4048, Win = 512, Data = Seq_no = 3024, Ack_no = 1, Win = 1024, Data = Seq_no = 4048, Ack_no = 129, Win = 1024, Data = t1t1 t2t2 t3t3 t4t4 Seq_no = 1, Ack_no = 2000, Win = 2048, No Data t0t0 Figure 8.25 Data Transfer (2)

6 FIN, seq = 5086 ACK = 5087 Data, seq. = 303, ACK = 5087 Deliver 150 bytes FIN, seq. =453, ACK = 5087 ACK = 454 Host A Host B ACK = 453 Figure 8.27 Connection Teardown


Download ppt "TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr."

Similar presentations


Ads by Google