ietf-corpus

rfc-6298

Computing TCP's Retransmission Timer

V. Paxson, M. Allman, J. Chu, M. Sargent
date2011-06 streamIETF areawit wgtcpm statusPROPOSED STANDARD pages11 canonicalhttps://www.rfc-editor.org/rfc/rfc6298 doi10.17487/RFC6298
This document defines the standard algorithm that Transmission Control Protocol (TCP) senders are required to use to compute and manage their retransmission timer. It expands on the discussion in Section 4.2.3.1 of RFC 1122 and upgrades the requirement of supporting the algorithm from a SHOULD to a MUST. This document obsoletes RFC 2988. [STANDARDS-TRACK]

obsoletes

updates

Extracted elements (22)

design-rationale §2.4

A minimum RTO of 1 second is required because research suggests a large minimum RTO is needed to keep TCP conservative and avoid spurious retransmissions, particularly since traditional TCP implementations use coarse-grain clocks.

tcp, congestion

design-rationale §Appendix A

The initial RTO was lowered from 3 seconds (RFC 2988) to 1 second because studies found over 97.5% of connections have RTTs under 1 second, and faster recovery from early packet loss outweighs the ~2.5% of connections that may incur a spurious SYN retransmission. The 3-second fallback after SYN timeout mitigates the impact on long-RTT connections.

tcp, congestion

design-rationale §2.3

The smoothing constants alpha=1/8 and beta=1/4 are specified as SHOULD-level recommendations based on Jacobson and Karels [JK88]. Using more RTT samples per RTT than one-per-RTT may make these constants inadequate, which remains an open research question.

tcp, congestion

interoperability-note §3

RFC 1323 recommends that TCP connections with large congestion windows take many RTT samples per window of data to avoid aliasing effects, but the alpha/beta values in this document may be inadequate in that case.

tcp, congestion

interoperability-note §3

The TCP timestamp option (RFC 1323) removes the ambiguity in Karn's algorithm: when timestamps are employed, RTT samples MAY be taken from retransmitted segments because the timestamp identifies which instance of the data segment triggered the ACK.

tcp

normative-requirement §2.5 MAY

A maximum value MAY be placed on RTO provided it is at least 60 seconds.

tcp

normative-requirement §3 MUST

A TCP implementation MUST take at least one RTT measurement per RTT, unless that is not possible per Karn's algorithm.

tcp

normative-requirement §1 MUST NOT

A TCP MUST NOT be more aggressive than the algorithms defined in this document allow, though it MAY be more conservative. This upgrades the algorithm from a SHOULD (RFC 1122) to a MUST.

tcp, congestion

normative-requirement §5 MUST

An implementation MUST manage retransmission timer(s) such that a segment is never retransmitted too early, i.e., less than one RTO after the previous transmission of that segment.

tcp

normative-requirement §4 MUST

If the K*RTTVAR term in the RTO calculation equals zero, the variance term MUST be rounded up to G seconds, ensuring RTO <- SRTT + max(G, K*RTTVAR) is always applied.

tcp

normative-requirement §5.7 MUST

If the timer expires waiting for the ACK of a SYN and the implementation is using an RTO less than 3 seconds, the RTO MUST be re-initialized to 3 seconds when data transmission begins (after the three-way handshake completes).

tcp

normative-requirement §2.3 MUST

On subsequent RTT measurements R', the host MUST update RTTVAR <- (1 - beta) * RTTVAR + beta * |SRTT - R'| then SRTT <- (1 - alpha) * SRTT + alpha * R' (in that order), then RTO <- SRTT + max(G, K*RTTVAR). The update order is mandatory: RTTVAR must be computed before SRTT is updated.

tcp, congestion

normative-requirement §3 MUST

TCP MUST use Karn's algorithm for taking RTT samples: RTT samples MUST NOT be made using segments that were retransmitted, due to ambiguity about which transmission triggered the ACK. The exception is when the TCP timestamp option is employed.

tcp

normative-requirement §2.1 SHOULD

Until a round-trip time measurement has been made, the sender SHOULD set RTO to 1 second, though exponential backoff on repeated retransmission still applies. A TCP implementation MAY use 3 seconds or any other value greater than 1 second.

tcp, congestion

normative-requirement §2.2 MUST

When the first RTT measurement R is made, the host MUST initialize SRTT <- R, RTTVAR <- R/2, and RTO <- SRTT + max(G, K*RTTVAR) where K=4.

tcp, congestion

normative-requirement §5.5 MUST

When the retransmission timer expires, the host MUST set RTO <- RTO * 2 (exponential backoff). The maximum RTO value from section 2.5 may bound this doubling.

tcp, congestion

normative-requirement §2.4 SHOULD

Whenever RTO is computed, if it is less than 1 second, it SHOULD be rounded up to 1 second. This minimum is required to keep TCP conservative and avoid spurious retransmissions.

tcp, congestion

protocol-element §2

TCP senders maintain two state variables for RTO computation: SRTT (smoothed round-trip time) and RTTVAR (round-trip time variation), plus a clock granularity constant G. The smoothing constants are alpha=1/8 and beta=1/4.

tcp, congestion

security-consideration §6

An attacker can inflate RTO by adding artificial latency to timed packets or their ACKs. However, this attack is largely redundant: the ability to delay packets usually implies the ability to drop them, offering no additional leverage.

tcp, security

security-consideration §6

An attacker who can forge ACKs for segments not yet received could lower RTO to an unsafe value, destabilizing the network. This requires the attacker to monitor path traffic to spoof correctly, and the sender's exponential backoff limits the sustained impact under actual congestion.

tcp, security, congestion

security-consideration §6

Correct RTO implementation is critical to Internet stability. Overly aggressive TCP behavior induced by manipulated RTO values could contribute to congestion collapse. The security considerations of RFC 5681 (TCP Congestion Control) also apply.

tcp, security, congestion

state-machine §5

The retransmission timer has three management rules: (5.1) start timer on any data send if not running; (5.2) stop timer when all outstanding data is acknowledged; (5.3) restart timer when an ACK acknowledging new data is received. On expiry: retransmit earliest unacknowledged segment, double RTO, and restart timer.

tcp, congestion