Download presentation
Presentation is loading. Please wait.
Published byNeil Elliott Modified over 9 years ago
1
COMT 4291 Communications Protocols and TCP/IP COMT 429
2
2 TCP Sliding Window Operation Sender Receiver snd.unasnd.nxt snd.una +snd.wnd rcv.nxt +rcv.wnd snd.wnd rcv.wnd
3
COMT 4293 Example... Sender Receiver 100120012501 5001 1001 5001 1501 Received and acked; not yet picked up by client Available receive window space Sent but no ack received yet Next segment to send Available window for further sends
4
COMT 4294 Segment Dispatch Dispatch segment to IP Set RTO (Retransmit Time Out) timer –Proportional to the Round Trip Time (RTT) Sender 100120012501 5001 Sent but no ack received yet Next segment to send Available window for further sends
5
COMT 4295 Segment Receipt with Pickup Send Ack segment with Ack=2001 Window = 4000 Receiver 1001 5001 1501 Received and picked up by client Available receive window space 2001 6001
6
COMT 4296 Segment Receipt w/o Pickup Send Ack packet with Ack = 2001 Window = 3500 Receiver 1001 5001 1501 Received and picked up by client Available receive window space 2001 5501 Received but not picked up by client
7
COMT 4297 Acknowledgement Receipt Seg received with Ack=2001, Win=3500 –Left window edge to 2001 –Right window edge to 5501 Sender 100120012501 5001 before 20012501 5001 after 5501
8
COMT 4298 Segment Receipt After Segment Loss Send a “duplicate” acknowledgement –Send Ack packet with Ack = 2001 –Window = 3500 Receiver 1001 5001 1501 Received and picked up by client 2001 5501 Received but not picked up by client Last segment received Missing segment
9
COMT 4299 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 20012501 50015501
10
COMT 42910 Retransmit Timing and Window 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”) 20012501 50015501
11
COMT 42911 Retransmission Timer Implementation 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
COMT 42912 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
COMT 42913 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 xxxxxxx 1001 5000
14
COMT 42914 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 xxxxxxx 1001 5000
15
COMT 42915 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
COMT 42916 Fast Retransmit 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 Sender 20012501 50015501
17
COMT 42917 Selective Acknowledgement Enabled during Syn and Syn/Ack Receiver send segment with –Ack = 2001, Window = 3500 –SACK option: block start=2501, end=2600 Receiver 1001 5001 15012001 5501 Last segment received Missing Segment 25012601
18
COMT 42918 Resources RFC 793 - Transmission Control Protocol Draft-ietf-tcplw-sack-02 - Selective Ack. RCF 1323 - TCP Extensions Van Jacobson Note on Fast Recovery (attached)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.