
TCP Error Control: Adaptive Retransmission Timeout in TCP Part 5
Learn about adaptive retransmission timeout in TCP, how to determine the timeout value, the importance of setting the retransmission timer, and how TCP adapts based on round-trip time measurements for efficient error control and congestion management.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
TCP Part 5: Error Control ECE 461 Professor Jorg Liebeherr 1
Takeaways Takeaways Adaptive retransmission timeout Determination of the value for the retransmission timeout (RTO) 2
Error control in TCP Error control in TCP TCP maintains a retransmission timer for each connection: The timer is started during a transmission. A timeout causes a retransmission TCP couples error control and congestion control (i.e., it often assumes that errors are caused by congestion) Retransmission mechanism is part of congestion control algorithm Here: How to set the timeout value of the retransmission timer? 3
TCP retransmission timer TCP retransmission timer The setting of the retransmission timer is crucial Timeout value too small Timeout value too large results in unnecessary retransmissions long waiting time before a retransmission can be issued TCP operates over short distances and long distances Client and server on same host: very short distance Client and server in different continents: very long distance Delays in the network are variable Retransmission timers must be adaptive 4
Roundtrip time measurements Roundtrip time measurements The retransmission mechanism of TCP is adaptive The retransmission timers are set based on round-trip time (RTT) measurements that TCP performs Segment 1 RTT #1 RTT Measurement: Time difference between transmission of a segment and receipt of ACK for that segment (Note: TCP does not ACK each segment) ACK for Segment 1 Segment 2 Segment 3 RTT #2 ACK for Segment 2 + 3 Segment 4 Segment 5 ACK for Segment 4 ACK for Segment 5 Only one measurement is done at a time Next measurement starts, when the previous measurement is completed RTT #3 5
Roundtrip time measurements Roundtrip time measurements Retransmission timer is set to retransmission timeout (RTO) value RTO is calculated based on the RTT measurements Suppose the measurements are RTT1 , RTT2 , RTT3 , . The RTT measurements are smoothed by the following estimators srtt and rttvar: srttn = RTTn + (1- ) srttn-1 rttvarn = ( | RTTn - srttn-1 | ) + (1- ) rttvarn-1 RTOn = srttn + 4 rttvarn Gains are set to =1/4 and =1/8 If RTO is less than 1 second, it should be rounded up to 1 second 6
Roundtrip time measurements: Roundtrip time measurements: initial values initial values Value of RTO before first RTT measurement: RTO = 1 sec For the first RTT measurement srtt1 = RTT rttvar1 = RTT / 2 RTO1 = srtt1 + 4 rttvar1 7
Karn Karn s algorithm s algorithm If an ACK for a retransmitted segment is received, the sender cannot tell if the ACK belongs to the original or the retransmission. segment Timeout ! retransmission of segment RTT ? RTT ? ACK Karn s Algorithm: Do not update srtt on any segments that have been retransmitted. Each time when TCP retransmits, perform the update: RTOn+1 = min ( 2 RTOn, 64) (exponential backoff) After a (configurable) number of retransmissions, TCP gives up 8
Managing the RTO timer Managing the RTO timer Recommended implementation has one timer per connection (Some systems have one RTO timer for each segment) Start RTO timer (set to RTO value), when a segment is transmitted and timer is not running Restart RTO timer, if ACK is received for new data Stop RTO timer, when all data is acknowledged When timer expires, retransmit first unacknowledged segment Use Karn s algorithm and restart RTO timer 9