Visual RFC.
ALL RFCs / RFC 9293
Read the RFC ↗

RFC 9293 / START HERE

TCP, before the details

TCP: Transmission Control Protocol

TCP gives applications a reliable, ordered stream of bytes between two endpoints. It handles missing and reordered data so the application can read the stream in order.

The idea in one picture

  1. An app writes bytes

  2. TCP tracks and retransmits

  3. The other app reads them in order

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Network packets can be lost, duplicated, or arrive out of sequence. Many applications need those problems handled for them.

A familiar example

When a file is downloaded over TCP, missing pieces are retransmitted before the application receives the complete byte stream.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. A reliable byte streamTCP offers applications an ordered, reliable stream of bytes over a network that may lose, duplicate, or reorder packets.
  2. Headers & connectionsTCP headers identify endpoints and carry the sequence, acknowledgment, window, and control information that drive the connection.
  3. Three-way handshakeBoth endpoints synchronize their initial sequence numbers before ordinary data transfer.
  4. Sequence & acknowledgmentSequence numbers identify byte positions. A cumulative acknowledgment names the next byte expected in order.
  5. Initial sequence numbersInitial sequence numbers help distinguish connection incarnations and make blind guessing harder.
  6. Loss & retransmissionThe sender keeps unacknowledged data and retransmits when loss recovery requires it.
  7. Flow controlThe advertised window limits how far the sender may send beyond acknowledged data, protecting the receiving endpoint.
  8. Congestion controlA receiver with plenty of space does not mean the network can carry an unlimited sending rate.
  9. Segments & small writesTCP chooses segment sizes using peer limits, the path, available windows, and small-write handling.
  10. Graceful closeA FIN ends one direction after its earlier bytes. The peer can still send in the other direction.
  11. Resets & idle probesA reset aborts a connection. Keep-alive probes, when enabled, test an idle connection without implying guaranteed failure detection.
  12. Security & the consolidated specTCP checks sequence and connection state, but its base protocol does not encrypt or cryptographically authenticate application data.
Start with chapter one →

This introduction explains RFC 9293 (2022). Read the original RFC ↗