Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.

Similar presentations


Presentation on theme: "1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno."— Presentation transcript:

1 1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno

2 2 Fast Retransmit / Fast Recovery in TCP A sender uses fast retransmit / fast recovery algorithm to improve throughput of TCP –“Fast” – because it doesn’t wait for time out when not getting an ACK for a segment In the old version (TCP Reno – RFC 2581) the algorithm can manage a loss at most of one packet from a single window of data An improvement that will be shown in the tutorial (TCP NewReno – RFC 2582, not a standard yet) enables to the algorithm to manage a loss of more than one packet without changing the TCP message structure Another improvement (TCP SACK – RFC 2018, part of the standard) enables to cope with a loss of more than one packet by changing message structure (using TCP options)

3 3 Fast Retransmit / Fast Recovery in TCP Reno Fast Retransmit – when the sender receives 3 “duplicative ACKs”, i.e. 4 identical ACKs without the arrival of any other intervening packets, then it assumes that the segment was lost, retransmits the segment and moves to Fast Recovery phase Fast Recovery – the sender decreases Congestion Window (cwnd) twice of its original size, adds 3 (3 packets have left the network and buffered by the receiver) and continue to send new segments (if allowed by the cwnd value) until receiving new different ACK, which should acknowledge receiving all segments sent till moving to Fast Recovery phase (assuming that no more segments were lost). –For each additional duplicated ACK received, increment cwnd by 1 –All this instead of moving to Slow Start phase

4 4 0 1 2 Ack(1) 3 4 5 6 7 8 Initial state cwnd=7 Slow start cwnd=8 Fast Retransmit cwnd=8/2+3=7 ssthresh=8/2=4 => Fast Recovery Ack(1) Ack(9) cwnd=8 cwnd=99 cwnd=1010 cwnd=1111 Exit Fast Recovery cwnd=ssthresh=4 => Congestion Avoidance Ack(10) 1 12

5 5 Limitation of TCP Reno algorithm If cwnd size is too small (smaller than 4 packets) then it’s not possible to get 3 duplicate acks and run the algorithm The algorithm can not manage a loss of multiple packets from a single window of data –It will cause a use of retransmission time out The algorithm doesn’t manage a loss of packets during the Fast Recovery stage –Not a loss of the retransmitted packet –There is no recursive run of the Fast Retransmit

6 6 SenderReceiver 0 1 2 Ack(1) 3 4 5 6 7 8 Initial State cwnd=7 Slow Start cwnd=8 1 Fast Retransmit cwnd=8/2+3=7 ssthresh=8/2=4 => Fast Recovery Ack(1) Ack(3) cwnd=8 Exit Fast Recovery cwnd=ssthresh=4 => Congestion Avoidance Ack(3) Flight Size =No. of Unacknowledged segments Flight Size > cwnd => No new segments cwnd=99 The algorithm doesn’t know which segments were acknowledged What was happen if this packet was lost?

7 7 TCP NewReno Idea: If the sender will remember a number of the last segment that was sent before entering the Fast Retransmit phase, then it can deal with a situation when a “new” ACK (which is not duplicate ACK) does not cover the last remembered segment (“partial ACK”), i.e. this is a situation when more packets were lost before entering the Fast Retransmit. After discovering such situation the sender will retransmit the new lost packet too and will stay at the Fast Recovery stage The sender will finish the Fast Recovery stage when it will get ACK that covers last segment sent before the Fast Retransmit

8 8 TCP NewReno – Retransmission due to Partial ACK When the sender gets a partial ACK, it retransmit the first unacknowledged segment Deflate the congestion window by the amount of new acknowledged data, then add back one MSS (Maximum Segment Size) and send a new segment if permitted by the new value of cwnd –This "partial window deflation" attempts to ensure that, when Fast Recovery eventually ends, approximately ssthresh amount of data will be outstanding in the network –Do not exit the Fast Recovery procedure (i.e., if any duplicate ACKs subsequently arrive, increment cwnd by MSS)

9 9 SenderReceiver 0 1 2 Ack(1) 3 4 5 Initial State cwnd=5 Slow Start cwnd=6 1 Fast Retransmit cwnd=6/2+3=6 ssthresh=6/2=3 Recover=6 => Fast Recovery Ack(1) Ack(3) cwnd=7 Recover < Ack Exit Fast Recovery cwnd=ssthresh=3 => Congestion Avoidance Ack(8) 7 6 Ack(1) Ack(3) 3 Recover >= Ack Partial Ack cwnd=7-(3-1)+1=6 cwnd=78 Ack(9)

10 10 When a sender should reset the Retransmit Timer ? In the “Impatient” variant – reset the timer only after the first Partial ACK. –As the result, invoking Slow-Start when retransmit timer will expire, especially when there are several packet lost and RTO is not much larger than RTT –This approach causes fast retransmission of many packets (Slow Start) and it’s appropriate for the case of multiple packet drops TCP NewReno – Resetting the Retransmit Timer

11 11 TCP NewReno – Resetting the Retransmit Timer When a sender should reset the Retransmit Timer ? In the “Slow and Steady” variant – reset the timer after each Partial ACK –As the result, remaining in Fast Recovery for a long time, especially when there are multiple packet drops and RTO is much larger than RTT –This approach recovers lost packets slowly (one at each RTT) and therefore appropriate for the case of small number of packet drops

12 12 TCP NewReno Summary Neither of the retransmit timers resetting variants is optimal. If the SACK option is available, the TCP sender always has the information to make intelligent decisions about which packets to retransmit and which packets not to retransmit during Fast Recovery. But it still worthwhile to combine NewReno in the standard together with the SACK option, because it demands the algorithm change only at the sender side, without changing a message structure and therefore enables to improve TCP effectiveness also for receivers that don’t support SACK.


Download ppt "1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno."

Similar presentations


Ads by Google