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

RFC 2018 / START HERE

TCP SACK, before the details

Selective Acknowledgment (SACK) is an optional extension to the Transmission Control Protocol (TCP). It reports which byte ranges arrived beyond a missing range. RFC 2018 defines SACK-permitted and SACK options; its name describes selective acknowledgment rather than a separate transport.

TCP puts bytes in order. A cumulative acknowledgment (ACK) names the next byte needed, so one gap keeps that number from advancing. SACK adds reports about later received bytes; it does not replace the cumulative ACK or deliver out-of-order bytes as an ordered stream.

Why it exists

When several ranges are missing, a sender can use SACK reports to avoid resending bytes already received while it repairs gaps. This publication defines reporting and sender guidance, not a complete congestion-control algorithm. The receiver can discard SACKed data, so the sender retains payload until cumulative acknowledgment.

A familiar example

Imagine a file transfer with bytes 1000–1099 missing while bytes 1100–1399 arrive. The receiver can send ACK 1000 plus SACK [1100,1400), meaning 1400 is excluded. After the gap is filled, ACK 1400 advances. SACK does not authenticate the report, promise permanent buffering or remove timeout recovery.

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. Permit SACK in the handshakeThe Transmission Control Protocol (TCP) carries an ordered byte stream. SACK means Selective Acknowledgment: the data receiver can report byte ranges received beyond a gap, while its ordinary ACK still names the next byte needed.
  2. Read the two edges of a SACK blockA SACK block describes a contiguous range of received bytes. Its left edge is included; its right edge is the first byte after the range.
  3. Report a changed receive queueThe receiver can hold later bytes while an earlier range is missing. Each new arrival changes the queue and may change its SACK report without advancing the cumulative ACK.
  4. Retain payload behind the scoreboardA sender can keep a scoreboard of ranges reported by SACK. This helps it avoid retransmitting received data while it repairs a gap.
  5. Recover safely after a timeoutA receiver may run short of buffer space and discard data it reported with SACK. This is called reneging. The sender must retain a way to recover.
Start with chapter one →

This introduction explains RFC 2018 (1996). Read the original RFC ↗