Skip to main content

RFC 793: Transmission Control Protocol

Overview
RFC 793, published in 1981 and authored by Jon Postel, specifies the Transmission Control Protocol (TCP), a core protocol of the Internet Protocol suite designed to provide reliable, ordered, end-to-end byte-stream communication between processes on different hosts. TCP is connection-oriented: communicating endpoints establish a logical association before user data is exchanged and use sequence numbers, acknowledgements, and checksums to detect loss, duplication, or corruption and to ensure correct in-order delivery.
The specification defines both conceptual behaviors and practical algorithms for packet handling, state management, and error control. It establishes TCP as a general-purpose transport layer that multiplexes multiple applications via port numbers, supports full-duplex data transfer, and provides mechanisms for urgent data and optional features to tune performance across diverse networks.

Segment Format and Core Fields
TCP segments consist of a fixed header with optional extension fields, followed by data. Key header fields include source and destination ports, sequence and acknowledgment numbers, data offset, control flags (SYN, ACK, FIN, RST, PSH, URG), window size, checksum, and urgent pointer. Options appear after the base header and allow negotiation of capabilities such as maximum segment size.
The protocol relies heavily on the 32-bit sequence number space to track bytes of data, enabling reliable delivery and retransmission policies. The window field implements receiver-driven flow control, allowing a receiver to advertise how many bytes it can accept, while the checksum protects both header and payload against transmission errors.

Connection Establishment and Teardown
TCP uses a three-way handshake to establish connections: a SYN from the initiator with an initial sequence number, a SYN-ACK from the responder with its sequence number and acknowledgment of the initiator, and a final ACK to complete the handshake. The handshake synchronizes sequence number spaces and negotiates initial parameters, and the protocol supports simultaneous open where both sides send SYNs.
Connection termination is a coordinated exchange of FIN and ACK flags, allowing each side to close independently and enabling half-close semantics where one side can stop sending while still receiving. The specification also defines the RST flag for abrupt termination and describes the TIME-WAIT state to handle delayed packets and ensure orderly resource release.

Reliability, Recovery, and Flow Control
Reliability is achieved through cumulative acknowledgements, retransmission of unacknowledged data, and careful timer management. RFC 793 outlines retransmission timers and algorithms for detecting lost segments; retransmissions continue until data is acknowledged or the connection is aborted. The persist timer addresses the deadlock that could occur when the receiver advertises a zero window, enabling the sender to probe for a revived window.
Flow control is enforced by the advertised window, which prevents senders from overwhelming receivers. The specification provides guidelines for managing sequence spaces and handling duplicated, reordered, or out-of-window segments, and it prescribes behavior for urgent data, which allows higher-priority bytes to be signaled and delivered promptly.

State Machine and Timers
The protocol is specified as a finite state machine with well-defined states such as LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, LAST-ACK, CLOSING, TIME-WAIT, and CLOSED. State transitions are driven by incoming segments, timers, and application actions (open, close, send).
Several timers are central to TCP robustness: retransmission timers adjust to measured round-trip times, the persist timer prevents deadlock on zero-window conditions, keepalive timers (optional) detect dead peers, and the TIME-WAIT duration ensures late segments are discarded before resources are reused.

Legacy and Impact
RFC 793 established the fundamental semantics and mechanisms that have endured in TCP implementations and evolution. While later research introduced more sophisticated congestion control and performance enhancements, the core ideas of sequencing, acknowledgements, windowed flow control, and the connection state machine remain directly traceable to this specification. TCP defined by RFC 793 provided a durable foundation for reliable Internet communication and guided decades of subsequent protocol development and refinement.
RFC 793: Transmission Control Protocol

This work describes the Transmission Control Protocol (TCP), a foundational protocol used in the Internet Protocol suite for reliable transmission of data between devices. It covers the functionalities, headers, algorithms, and error handling techniques used in TCP.


Author: Jon Postel

Jon Postel, a key figure in Internet history, known for his role in developing TCP/IP and managing DNS.
More about Jon Postel