RFC 793: TCP: Reliable data streams over IP

Summary

With RFC 793, Jon Postel specified the Transmission Control Protocol in September 1981, which creates a reliable, ordered byte stream between two endpoints over IP. Sequence numbers, acknowledgements, a receive window and the three-way handshake form its core. After 41 years and many additions, RFC 9293 consolidated TCP in August 2022 and declared RFC 793 obsolete.

Reliability from unreliable packets

TCP numbers every byte, not every packet. The receiver acknowledges how far it has received without gaps and uses the window to report how many more bytes it can take. If an acknowledgement is missing, the sender retransmits. Over lossy networks this produces a stream that looks like a file or pipe to applications.

A connection starts with the three-way handshake of SYN, SYN-ACK and ACK. RFC 793 tied the initial sequence number to a clock that ticks roughly every four microseconds and wraps after about 4.55 hours; the text set the Maximum Segment Lifetime arbitrarily to two minutes.

What was missing in 1981

Congestion control does not appear in RFC 793. Only the congestion collapses on the internet in the mid-1980s led to slow start and congestion avoidance, which RFC 1122 made mandatory in 1989. Predictable sequence numbers also turned out to be a security hole, against which RFC 6528 prescribed random initial values in 2012.

RFC 9293 collects these corrections in one document. Anyone who wants to understand TCP today therefore reads RFC 9293 and uses RFC 793 as the historical starting point.

Ideas

  • TCP numbers bytes so that losses and reordering become detectable.
  • Acknowledgements and retransmissions turn packets into a dependable stream.
  • The receive window protects slow receivers from being flooded.
  • Three messages set up a connection: SYN, SYN-ACK and ACK.
  • The robustness principle also appears in RFC 793.
  • Congestion control was only added later.

Insights

  • Flow control protects the receiver, congestion control protects the network; RFC 793 only knew the former.
  • A protocol can last four decades if additions stay compatible and eventually come together in one document again.

Facts

  • RFC 793 appeared in September 1981, together with RFC 791 for IPv4.
  • Under RFC 793 the initial sequence number wrapped around about every 4.55 hours.
  • RFC 793 sets the Maximum Segment Lifetime to two minutes.
  • RFC 9293 from August 2022 replaces RFC 793 as Internet Standard.

References

Remarks

  • Many textbooks still cite RFC 793; for detailed questions on options, congestion control or security, RFC 9293 is authoritative.

Recommendations

  • Use RFC 9293 rather than RFC 793 for current implementation questions.
  • For performance problems, measure loss, round-trip time and window size separately, for example with ss -ti on Linux.
  • Investigate dropped connections with a capture of the handshake before changing parameters.

Read the RFC at the RFC Editor

Search the Web Archive

Found a mistake or have something to add? Get in touch.