1 / 18

Communications Protocols and TCP/IP

Communications Protocols and TCP/IP. COMT 429. TCP Sliding Window Operation. Sender. snd.una +snd.wnd. snd.una. snd.nxt. snd.wnd. Receiver. rcv.nxt +rcv.wnd. rcv.nxt. rcv.wnd. Example. Sender. 5001. 1001. 2001. 2501. Available window for further sends. Next segment to send.

Télécharger la présentation

Communications Protocols and TCP/IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communications Protocols and TCP/IP COMT 429

  2. TCP Sliding Window Operation Sender snd.una +snd.wnd snd.una snd.nxt snd.wnd Receiver rcv.nxt +rcv.wnd rcv.nxt rcv.wnd

  3. Example ... Sender 5001 1001 2001 2501 Available window for further sends Next segment to send Sent but no ack received yet Receiver 5001 1001 1501 Available receive window space Received and acked; not yet picked up by client

  4. Segment Dispatch • Dispatch segment to IP • Set RTO (Retransmit Time Out) timer • Proportional to the Round Trip Time (RTT) Sender 5001 1001 2001 2501 Available window for further sends Next segment to send Sent but no ack received yet

  5. Segment Receipt withPickup Receiver • Send Ack segment with Ack=2001 • Window = 4000 5001 6001 1001 1501 2001 Available receive window space Received and picked up by client

  6. Segment Receipt w/oPickup Receiver • Send Ack packet with Ack = 2001 • Window = 3500 5001 5501 1001 1501 2001 Available receive window space Received but not picked up by client Received and picked up by client

  7. Acknowledgement Receipt • Seg received with Ack=2001, Win=3500 • Left window edge to 2001 • Right window edge to 5501 Sender before 5001 1001 2001 2501 after 5001 5501 2001 2501

  8. Segment Receipt AfterSegment Loss Receiver • Send a “duplicate” acknowledgement • Send Ack packet with Ack = 2001 • Window = 3500 5001 5501 1001 1501 2001 Last segment received Missing segment Received but not picked up by client Received and picked up by client

  9. Retransmission • Highest Ack Number received is 2001 • Duplicate Ack=2001 may have been received • RTO timer for segment 2001 expires and 2001 is retransmitted • Trigger congestion avoidance algorithm Sender 5001 5501 2001 2501

  10. Retransmit Timing andWindow Size - Single Error • BDP (Bandwidth Delay Product) • Ethernet: 1ms * 10Mbps = 1250 bytes • Satcom T1: 500ms * 1.5Mbps = 94 kbytes • Assume window size = BDP • RTO > 2*RTT • “Recovery Ack” after retransmit needs 1 RTT • Channel idles for length of RTO (“drained pipe”) 5001 5501 2001 2501

  11. Retransmission TimerImplementation • Running estimate (based on Acks) of • Average RTT • RTT variance factor • Exclude retransmissions • Set RTO to RTT times RTT variance factor (with a hard upper bound) • Around 2 RTT for lightly loaded links • As high as 16 RTT for congested links

  12. The Congestion Collapse Problem • Original TCP specs used the window for flow control, and 2*RTT for the RTO • Congestion of a link causes the RTO timers to “go off” before an ack can be returned • The network goes into steady state congestion where every segement is transmitted about three times

  13. Congestion Issues • Slow Start - New Connection • Set send window to MSS • Increase the window by MSS for each ack received • Exponential increase in send window size x x x x x x x 5000 1001

  14. Congestion Issues cont... • Slow Start - After retransmission • Exponential slow-start up to 1/2 of the original window size • Increase the window by MSS for each send window acked without loss • Linear increase in send window size x x x x x x x 5000 1001

  15. Congestion Issues cont... • Congestion Avoidance, Timer Back-Off • Reduce send window to 1/2 of previous size for each retransmit (exponential back-off) • After a segment is retransmitted, set the new RTO timer for that segment to 2*RTO, up to a hard upper bound (2*MSL, Maximum Segment Life)

  16. Fast Retransmit Sender • Duplicate Ack=2001 have been received • Re-send segment 2001 before RTO expires • “Guess” that 2001 was lost • Wait for >=3 dup acks (segements could just have arrived out-of-order) • Enter congestion avoidance with allowance for duplicate acks 5001 5501 2001 2501

  17. Selective Acknowledgement Receiver • Enabled during Syn and Syn/Ack • Receiver send segment with • Ack = 2001, Window = 3500 • SACK option: block start=2501, end=2600 5001 5501 1001 1501 2001 2501 2601 Last segment received Missing Segment

  18. Resources • RFC 793 - Transmission Control Protocol • Draft-ietf-tcplw-sack-02 - Selective Ack. • RCF 1323 - TCP Extensions • Van Jacobson Note on Fast Recovery (attached)

More Related