Visual RFC.
ALL RFCs / RFC 5482
Read the RFC ↗
RFC 5482 / TCP USER TIMEOUT

Respect keep-alives, middleboxes and resources

06

Other timers and resource policies can end a connection earlier. A longer suggested user timeout neither preserves firewall state nor reserves unlimited server memory.

RFC 5482 · § 4.2EXAMPLE
4 / 4
04
Limit the resources behind long waits

Completed connections occupy server state. Local upper limits and resource policies bound exposure; a host can shed load rather than promise unlimited waiting.

Respect keep-alives, middleboxes and resourcesCompleted connections occupy server state. Local upper limits and resource policies bound exposure; a host can shed load rather than promise unlimited waiting.Limit the resources behind long waitsEstablished connection stateconnection 1 retainedconnection 2 retainedchosen load shedding: resetLocal limits and resource policies applyPer-peer limits do not stop distributed attacksNo guarantee of unlimited waiting or survival

Key idea: With keep-alives and UTO enabled, the keep-alive timer MUST exceed the adopted USER_TIMEOUT.

Terms
Keep-alive
Optional TCP probing/policy for an otherwise idle connection.
Middlebox
An on-path device such as a stateful firewall.
Connection state
Memory and other resources kept for a TCP connection.

Look up a term in the glossary ↗

Rules & examples
  • An implementation using keep-alives with UTO MUST set the keep-alive timer to a value larger than the adopted USER_TIMEOUT (§4.2). This prevents that keep-alive policy from aborting a connection that the longer user timeout was meant to preserve.
  • The invalid example uses keep-alive 300 seconds with USER_TIMEOUT 600; the valid example uses 900 > 600. These are illustrative timer values, not a default or universal tuning recommendation.
  • A stateful firewall can discard connection state after inactivity regardless of endpoint UTO values (§4.1). The separate firewall example expires after 120 seconds even though endpoints are willing to wait 600. UTO does not repair the path or refresh every middlebox.
  • Long user timeouts retain established connection state and can amplify resource exhaustion when an attacker completes handshakes (§6). They do not lengthen the unsynchronized wait used by simple SYN floods (§3.3).
  • Upper/lower limits, appropriate trust decisions and resource-sensitive policies can reduce the impact. Per-peer limits alone do not protect against distributed attacks. Hosts may close or reset connections to shed load; the advertised timeout is not a reservation.
  • The RFC’s historical references to authentication mechanisms are context, not a mandate to deploy TCP-MD5 or old TLS. This guide models no authentication, cryptography, firewall or full security policy.

The resource queue and firewall are schematic examples. The option does not establish trust, encrypt data, guarantee a connection survives, or specify a portable operating-system socket API.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

Suggest how long to keep waiting

Imagine two people holding a shared call open during a brief outage. Telling the other person your waiting limit can help, but they still choose their own limit. This analogy is not a promise that the network or either endpoint will stay available.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 5482

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗