Download presentation
Presentation is loading. Please wait.
Published byAlisha Jennings Modified over 6 years ago
1
Transmission Control Protocol (TCP) Retransmission and Time-Out
Lesson 15 Transmission Control Protocol (TCP) Retransmission and Time-Out
2
Transmission Control Protocol (TCP) Retransmission and Time-Out
Retransmission time-out and round-trip time Retransmission behavior Calculating the RTO Using the TCP timestamps option Karn’s algorithm Fast retransmit Fast recovery
3
Retransmission Time-Out and Round-Trip Time
RTO must allow enough time for: 1. The sent TCP segment to traverse the internetwork 2. The TCP segment to be received and processed by the destination node 3. The generation of an ACK for the segment 4. The generated ACK to traverse the internetwork 5. The generated ACK to be received and processed by the sending node RTO too large Lowered throughput RTO too small Unnecessary retransmissions
4
Congestion Collapse Begins with a steady increase in the load on the internetwork The transit time increases The actual RTT increases than the currently known RTT of sending hosts When actual RTT becomes larger than the current RTO of sending hosts, segments are retransmitted Buffers on the internetwork routers fill and packets are discarded
5
Retransmission Behavior
Exponential backoff behavior 1. When the TCP segment is initially sent, the RTO for the segment is set to the currently known RTO for the connection 2. After RTO number of seconds, when the RTO expires, the segment RTO is set to twice the RTO for the segment’s previous transmission and retransmitted Repeat step 2 for maximum number of retransmissions
6
Dead Gateway Detection
When an individual TCP connection retransmits a segment multiple times, its next-hop IP address is changed to the next default gateway When 25 percent of all TCP connections using the failed default gateway have been moved to the next default gateway, the default route in the IP routing table is updated with the next default gateway as the next-hop IP address
7
Calculating the RTO Recommended formulas:
SRTT = RTT + 8*(New_RTT - RTT) Dev = Dev + (|New_RTT - RTT| - Dev)/4 RTO = SRTT + Dev/4 Self-tunes for different environments (LAN vs. WAN) and is sensitive to sudden changes in the RTT Environments such as the Internet
8
Using the TCP Timestamps Option
TCP timestamps with pauses in data TCP timestamps for delayed acknowledgments TCP timestamps and out-of-order segments TCP timestamps and retransmitted segments
9
TCP Timestamps with Pauses in Data
Block 1, TS Value = 100, TS Echo Reply = 9000 ACK on Block 1, TS Value = 9020, TS Echo Reply = 100 Block 2, TS Value = 158, TS Echo Reply = 9020 ACK on Block 2, TS Value = 9053, TS Echo Reply = 158 1 2 3 4 5 6 TCP Peer A TCP Peer B . (pause) Block 3, TS Value = 2057, TS Echo Reply = 9053 ACK on Block 3, TS Value = 10951, TS Echo Reply = 2057 TS = 9053 TS = 10951
10
TCP Timestamps for Delayed Acknowledgments
Segment 1, TS Value = 100, TS Echo Reply = 9000 (1000 bytes of data) Segment 2, TS Value = 150, TS Echo Reply = 9000 ACK on Segments 1-3, TS Value = 9250, TS Echo Reply = 100 1 2 3 4 TCP Peer A TCP Peer B lastack = 1000 tsrecent = 10 Segment 3, TS Value = 200, TS Echo Reply = 9000 tsrecent = 100 lastack = 4000
11
TCP Timestamps and Out-of-Order Segments
Segment 1, TS Value = 100, TS Echo Reply = 9000 (1000 bytes of data) Segment 3, TS Value = 250, TS Echo Reply = 9150 ACK on Segment 1, TS Value = 9150, TS Echo Reply = 100 1 2 3 4 TCP Peer A TCP Peer B lastack = 1000 tsrecent = 10 Segment 2, TS Value = 200, TS Echo Reply = 9150 tsrecent = 100 lastack = 2000 tsrecent = 200
12
TCP Timestamps and Retransmitted Segments
Segment 1, TS Value = 100, TS Echo Reply = 9000 (1000 bytes of data) Segment 3, TS Value = 200, TS Echo Reply = 9150 ACK on Segment 1, TS Value = 9150, TS Echo Reply = 100 TCP Peer A TCP Peer B lastack = 1000 tsrecent = 10 Segment 2, TS Value = 500, TS Echo Reply = 9150 (1000 bytes of data-retransmitted) tsrecent = 100 lastack = 2000 tsrecent = 500 Segment 2, TS Value = 150, TS Echo Reply = 9150 (1000 bytes of data-dropped)
13
Karn’s Algorithm When an ACK for a retransmitted segment arrives, it should not be used to update the RTO. The RTO of the retransmitted segment (that has been exponentially backed off) should be used as a temporary RTO for subsequent TCP segments. When an ACK for a nonretransmitted TCP segment arrives, use its RTT to update the RTO. Then, use the updated RTO for subsequent TCP segments. Karn’s algorithm is not used with TCP timestamps
14
Fast Retransmit TCP Peer A TCP Peer B Segment 1, Seq #=1000
ACK, Ack #=1000
15
Fast Recovery Fast retransmit causes the sender to retransmit the missing TCP segment before its RTO expires If the RTO expires, slow start and congestion avoidance algorithms are used to gradually increase the actual send window up to the advertised receive window Because the RTO did not expire, congestion avoidance is performed, but not slow start
16
Review Retransmission time-out and round-trip time
Retransmission behavior Calculating the RTO Using the TCP timestamps option Karn’s algorithm Fast retransmit Fast recovery
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.