Use it in a capture to tell real loss from reordering and from retransmissions that were never needed.
TCP SACK & Reordering Evidence
Selective acknowledgment (SACK) lets a TCP receiver report exactly which data arrived beyond a gap, so the sender resends only what is missing.
1. Handshake: did both sides send SACK permitted?
2. Find duplicate acknowledgments: do they carry SACK blocks?
3. Does a retransmission follow, or does the gap fill by itself?
4. By itself, repeatedly → reordering on the path (per-packet load sharing).
5. No SACK at all → a host setting or a device stripping the option.
SACK permitted in SYN and SYN-ACK → gap at the receiver → acknowledgment repeats with SACK blocks → sender resends only the missing range → acknowledgment advances past the gap
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
tcpdump -ni eth0 host 192.0.2.10 and tcp port 443Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification Verify boundary
tcpdump -ni eth0 host 192.0.2.10 and tcp port 443
ss -ti dst 192.0.2.10
sysctl net.ipv4.tcp_sack
tcpdump prints the option on acknowledgments that carry it, for example ack 1461 … options [nop,nop,sack 1 {2921:7301}] — everything before 1461 has arrived, and also 2921 to 7300. ss -ti shows sack among a connection's active features and counts retransmissions and reordering. sysctl shows whether the option is enabled on a Linux host.
In Wireshark: tcp.options.sack finds segments with SACK blocks, tcp.options.sack.dsack duplicate reports; tcp.analysis.out_of_order and tcp.analysis.retransmission mark what the analyser inferred. Confirm in the handshake that both sides sent SACK permitted.
Known-good: SACK is permitted in both directions; gaps, when they occur, are reported with blocks and filled by a single retransmission.
Step 2 Failure isolation workflow Narrow the fault
- A single loss causes a long run of retransmissions. SACK is not in use: disabled on one host, or removed from the handshake by a device on the path.
- Gaps fill without retransmission, again and again. Reordering on the path — often per-packet load sharing over paths of different delay.
- Frequent duplicate SACK reports. The sender retransmits too eagerly, or acknowledgments are being lost on the return path.
- SACK blocks refer to sequence numbers that do not fit the connection. A firewall rewrites sequence numbers but leaves the SACK option untouched; the sender then misinterprets them.
- Many separate SACK blocks at once. A burst of loss — a queue overflowing.
- "Out of order" marked on every large transfer in a host-side capture. An artefact of the network card's offloading; capture on the wire to be sure.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Duplicate acknowledgments with SACK blocks, then a retransmission that fills the gap: loss. The gap filling without a retransmission: reordering. A SACK block below the acknowledgment number: an unneeded retransmission. It is used only if both sides sent "SACK permitted" in the handshake.
tcpdump -ni <if> host <ip> and tcp port <port>— the option on acknowledgments, e.g.sack 1 {2921:7301}.ss -ti dst <ip>—sackamong the connection's features, plus retransmission and reordering counters.sysctl net.ipv4.tcp_sack— enabled on the host?- Wireshark:
tcp.options.sack,tcp.options.sack.dsack.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
Selective acknowledgment (SACK) lets a TCP receiver tell the sender exactly which data has arrived when there is a gap. Without it the receiver can only report the point up to which everything is complete; with it, the receiver adds the ranges it holds beyond the gap.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
SACK makes recovery from loss efficient — the sender resends only what is missing. In a capture it is also the best evidence for telling apart three things that look alike: real loss, packets that merely arrived out of order, and retransmissions that were never needed.
ReferenceHow it works1 section · depth on demand
How it works
Without SACK. Suppose segments 1 to 5 are sent and segment 2 is lost. The receiver gets 1, 3, 4, 5 and can only keep answering "I have everything up to the end of 1". The sender knows something after 1 is missing but not what else arrived; it may resend 2, 3, 4 and 5.
With SACK. The receiver answers "everything up to the end of 1 — and also 3 to 5". The sender resends 2 alone.
In the packets.
- Both sides announce support with the SACK permitted option in SYN and SYN-ACK. It is used only if both did.
- During the connection, an acknowledgment that reports a gap carries a SACK option with one or more blocks. Each block is a pair of sequence numbers: the left edge (first byte held) and the right edge (the byte after the last one held).
- Up to three or four blocks fit; the most recently received range is listed first.
- The ordinary acknowledgment number stays where the gap begins until the gap is filled.
Duplicate SACK (D-SACK). A receiver that gets data it already has reports that range in a SACK block lying below the acknowledgment number. It tells the sender "that retransmission was unnecessary" — the original had arrived, only late, or the acknowledgment was lost.
Reading a capture.
| What is seen | Meaning |
|---|---|
| Duplicate acknowledgments with SACK blocks, then a retransmission that fills the gap | Real loss, recovered |
| Duplicate acknowledgments with SACK blocks, then the gap fills without a retransmission | Reordering: the "missing" segment arrived late |
| A SACK block below the acknowledgment number | An unneeded retransmission |
| Several separate SACK blocks | Several segments lost from one burst |
Where the capture is taken matters. A capture at the sender shows what was transmitted, not what arrived; the receiver's acknowledgments and SACK blocks are the receiver's own account of what it got.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
SACK and reordering in practice
Selective acknowledgement lets a receiver report exactly which data has arrived beyond a gap. RFC 2018 defines two options. SACK-permitted (kind 4) is sent only in the SYN. The SACK option itself (kind 5) carries blocks, each with a left edge and a right edge. Because the option takes 8n + 2 bytes and TCP has 40 bytes of option space, an ACK carries at most four blocks, or three alongside the timestamp option. The first block must describe the segment that triggered the ACK, so the newest information always comes first.
Sender and receiver rules (RFC 2018)
| Side | Rule |
|---|---|
| Receiver | Report the newest block first; repeat recent blocks for redundancy |
| Receiver | May discard SACKed data (reneging), though this is discouraged |
| Sender | Skip SACKed segments when retransmitting |
| Sender | Keep data until it is acknowledged cumulatively |
| Sender | After an RTO, clear SACK marks and resend from the left edge |
Loss or reordering?
| Observation | Likely |
|---|---|
| A gap that the original segment fills a few milliseconds later | Reordering, for example across ECMP paths or link bundles |
| A gap filled only by a retransmission | Real loss |
| D-SACK blocks reporting data already received | Spurious retransmission caused by reordering |
| Many small SACK blocks | Several losses in one window: congestion or a policer |
host$ tshark -r capture.pcap -Y "tcp.options.sack_le" -T fields -e frame.number -e tcp.ack -e tcp.options.sack_le -e tcp.options.sack_re | head -4
4101 1830500961 1830502409 1830505305
4102 1830500961 1830502409 1830506753
4105 1830506753
host$ nstat -az TcpExtTCPSACKReorder TcpExtTCPSACKRecovery TcpExtTCPDSACKRecv
host$ sysctl net.ipv4.tcp_sack net.ipv4.tcp_dsack
In this excerpt, ACK 4105 jumps straight to 1830506753 without a retransmission in between. The "missing" bytes arrived late, so the gap was reordering, not loss.
Reordering in networks
Per-packet load balancing, some link aggregation hash settings and multipath WAN features can reorder packets in a flow. Keep load balancing per flow so that a TCP connection stays on one path.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → TCP SACK & Reordering Evidence. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
TCP SACK / Reordering
Gap and selective recovery workflow.
1. Confirm SACK permitted in SYN exchange.
2. Find cumulative ACK gap.
3. Read SACK blocks.
4. Locate retransmitted sequence range.
5. Verify cumulative ACK advances after recovery.