Fast Retransmit, SACK Recovery and RACK-TLP
How TCP repairs losses without waiting for its timer: duplicate ACKs and fast retransmit, how SACK lets a sender repair several losses in one round trip, Linux's time-based RACK loss detection and tail loss probes, all measured by dropping chosen segments in the lab.
kvi5hnuCode Sprout team member13 min readOn this page
A retransmission timeout (article 65) costs at least 200 ms on Linux and cuts the sending rate to one segment. On a busy connection, TCP almost never needs it. The receiver's ACKs reveal losses much sooner: when segments arrive after a gap, the receiver keeps acknowledging the same byte, and with SACK it reports exactly which data arrived. This article shows TCP using that information, by dropping chosen segments of a transfer on the lab router.
The lab setup: a 300 KB transfer from the server to the client, 20 ms of delay each way, and a router rule that drops the first transmission of particular data segments (counted from 1, 1,448 bytes each). Captures were taken next to the server.
Duplicate ACKs and fast retransmit
A receiver that gets a segment beyond a gap can't move its cumulative ACK forward, so it sends an ACK for the same byte again: a duplicate ACK. One duplicate ACK might just mean reordering. Several in a row strongly suggest a loss. The classic rule (RFC 5681) is fast retransmit: after 3 duplicate ACKs, resend the missing segment at once, without waiting for the timer. A sender then enters fast recovery, reducing its congestion window by half (Reno) or to 0.7 times (Linux's default CUBIC) instead of to one segment (articles 72 and 75). How much it sends during the recovery round trip is decided today by Proportional Rate Reduction (PRR, RFC 9937, December 2025), which Linux has used since 2012 (article 73).
SACK: reporting what did arrive
Duplicate ACKs say that something is missing, but not what else arrived. With the SACK option (RFC 2018, negotiated in the handshake as in article 60), each duplicate ACK also carries SACK blocks listing ranges received beyond the cumulative ACK.
In the lab, segment 30 was dropped. The client's ACKs, and the server's response:
0.4948 client: ACK 41993 SACK 43441-44889
0.4948 client: ACK 41993 SACK 43441-46337
0.4948 client: ACK 41993 SACK 43441-47785
...
0.4948 server: RETRANSMISSION seq=41993 len=1448
Every ACK still acknowledged byte 41,993, the start of segment 30: segment 1 starts at relative byte 1, so segment 30 starts at 1 + 29 × 1,448 = 41,993. The first SACK block, 43441-44889, is segment 31 (41,993 + 1,448 = 43,441, and 43,441 + 1,448 = 44,889; the end number is the byte just after the block). The cumulative ACK stayed put while the SACK block grew as segments 31, 32, 33 and onward arrived. The server resent segment 30 as soon as these ACKs arrived. The rules for SACK receivers (RFC 2018):
- The first SACK block reports the range containing the segment that triggered this ACK, so the newest information is always included.
- Later blocks repeat recently reported ranges, so a lost ACK doesn't lose information.
- Up to 4 blocks fit, or 3 with timestamps (article 60).
The sender keeps a scoreboard: for each segment in flight, whether it's been SACKed, presumed lost or retransmitted. It retransmits the holes and sends new data when the scoreboard says enough has left the network (RFC 6675 describes this "pipe" accounting).
Repairing several losses at once
SACK matters most when several segments in one window are lost. The lab dropped segments 30, 33 and 36, first with SACK and then with SACK disabled on the client:
0.497 s retransmitted seq 41993 (segment 30)
0.497 s retransmitted seq 46337 (segment 33)
0.497 s retransmitted seq 50681 (segment 36)
0.489 s retransmitted seq 41993 (segment 30)
0.534 s retransmitted seq 46337 (segment 33)
0.579 s retransmitted seq 50681 (segment 36)
sack: received 300000 bytes in 369 ms after the server started sending
nosack: received 300000 bytes in 507 ms after the server started sending
The plots below show the two runs as sequence number against time.

With SACK, the scoreboard showed all three holes at once, and all three retransmissions went out together. Without SACK, the sender used NewReno recovery (RFC 6582). It learns about the next hole only when the ACK for the previous retransmission arrives and moves the cumulative ACK just partway, a partial ACK, so it repairs one loss per round trip. Three losses cost three round trips, and the transfer finished more than 100 ms later. The counters show which recovery each run used:
TcpRetransSegs 3 0.0
TcpExtTCPSackRecovery 1 0.0
TcpExtTCPFastRetrans 3 0.0
TcpRetransSegs 3 0.0
TcpExtTCPRenoRecovery 1 0.0
TcpExtTCPFastRetrans 3 0.0
TCPSackRecovery counts recovery episodes driven by SACK, and TCPRenoRecovery episodes driven by duplicate ACKs alone. Practically every modern TCP negotiates SACK, so NewReno recovery is now rare.
RACK: detecting loss by time
Look again at the single-loss run. The server didn't wait for 3 duplicate ACKs. It resent segment 30 right after the first SACK arrived. That's Linux's default loss detection, RACK (Recent ACKnowledgment, RFC 8985), at work.
Counting duplicate ACKs is fragile: a reordered network can produce three of them without any loss, and a small window may never produce three. RACK uses time instead:
A segment is lost if a segment sent after it has been delivered (ACKed or SACKed), and more than one RTT plus a small reordering window has passed since it was sent.
The lab connection was still in slow start, so segments went out in flights one RTT apart:
0.4046 server: sent segment 29 (seq 40545)
0.4046 server: sent segment 30 (seq 41993)
0.4496 server: sent segment 31 (seq 43441)
Segment 30 was the last of one flight, and segment 31 the first of the next, sent 45 ms later. When the SACK for segment 31 arrived, segment 30 had been sent more than one RTT before a segment that was now delivered, so RACK declared it lost immediately. Within a single flight, where segments leave microseconds apart, RACK waits a reordering window (a quarter of the minimum RTT by default) before deciding. If reordering is ever seen on a connection, RACK widens that window.
RACK has two big advantages over dupthresh, the classic threshold of 3 duplicate ACKs. It works the same whether 1 or 100 segments follow the loss. And it can detect a lost retransmission, because the retransmission has its own send time: if later-sent data is delivered and the retransmission isn't, it's lost too. Classic fast recovery can only fall back to a timeout in that case. Linux enables RACK through net.ipv4.tcp_recovery (1 by default) and still also honors the duplicate-ACK threshold. QUIC's loss detection (RFC 9002, article 86) is built on the same time-based idea, with probe timeouts in place of TLP and RTO.
Tail loss probes
Both fast retransmit and RACK need later data to arrive. When the lost segments are the last ones sent, at the tail of a response, nothing follows them, so no ACK reveals the loss and the sender would wait for its timeout. Tails matter: most web responses are short, so a loss is quite likely to hit the last few segments.
TLP (tail loss probe, also in RFC 8985) handles this. When no ACK has arrived for about two smoothed RTTs after the last transmission, the sender retransmits the last segment (or sends new data, if any is waiting). If the probe arrives, its ACK or SACK reveals the earlier holes, and RACK repairs them. If only one segment is outstanding, the probe waits longer, allowing for the receiver's delayed ACK, which makes the probe time about the same as the RTO on Linux.
The lab dropped the last two segments, 9 and 10, of a 10-segment response, five times with TLP on (the default, net.ipv4.tcp_early_retrans = 3) and five times with it off:
tcp_early_retrans = 3 (TLP on):
trial 1: resent seg 10 at 149 ms, seg 9 at 194 ms; all data acknowledged at 239 ms
trial 2: resent seg 10 at 143 ms, seg 9 at 390 ms; all data acknowledged at 437 ms
trial 3: resent seg 10 at 150 ms, seg 9 at 406 ms; all data acknowledged at 451 ms
trial 4: resent seg 10 at 150 ms, seg 9 at 406 ms; all data acknowledged at 450 ms
trial 5: resent seg 10 at 148 ms, seg 9 at 193 ms; all data acknowledged at 240 ms
tcp_early_retrans = 0 (TLP off):
trial 1: resent seg 9 at 298 ms, seg 10 at 343 ms; all data acknowledged at 387 ms
trial 2: resent seg 9 at 295 ms, seg 10 at 340 ms; all data acknowledged at 386 ms
trial 3: resent seg 9 at 299 ms, seg 10 at 343 ms; all data acknowledged at 389 ms
trial 4: resent seg 9 at 314 ms, seg 10 at 359 ms; all data acknowledged at 405 ms
trial 5: resent seg 9 at 305 ms, seg 10 at 349 ms; all data acknowledged at 394 ms
The chart below draws each trial as a timeline.

The probe went out at about 145 ms in every trial with TLP on, long before the RTO. In two trials, it worked as designed: the probe's SACK let RACK repair segment 9 one round trip later, and the response completed at 240 ms instead of about 390 ms. In the other three, the probe arrived but segment 9 was still repaired only by the timeout. Because the probe had restarted the retransmission timer, those runs finished about 60 ms later than with TLP off. The counters for the five runs with TLP on:
TcpRetransSegs 10 0.0
TcpExtTCPSackRecovery 2 0.0
TcpExtTCPTimeouts 3 0.0
TcpExtTCPLossProbes 5 0.0
Five probes were sent, two recoveries were SACK-driven, and three runs still needed a timeout. One detail in RACK is the likely reason, though the lab didn't verify it. A SACK that covers a retransmitted segment is ambiguous: it might be for the original transmission. Linux ignores such a SACK for RACK's timing when the RTT it implies is below the connection's minimum RTT. The lab path's delay was almost perfectly constant, so the probe's RTT sat right at that minimum. Real paths vary more, and TLP is enabled by default because, across real traffic, it removes many slow timeouts.
SACK in a capture
When reading a capture of SACK recovery, keep in mind:
- The cumulative ACK stays put during recovery, while the SACK blocks grow.
- Retransmissions are often sent together, one per hole, as soon as the scoreboard marks them lost.
- A SACK block that starts below the cumulative ACK is a DSACK: the receiver reporting a duplicate (article 67).
- A receiver may, in principle, discard SACKed data it hasn't delivered (reneging). Senders must keep SACKed data until it's cumulatively acknowledged. Linux counts reneging in
TCPSACKReneging, which should stay at 0.
Common questions
Is the three-duplicate-ACK rule still used?
Yes, as a fallback and in other stacks, but Linux's RACK usually detects losses earlier or more reliably using time. In the lab, a single SACK was enough because the next segment had been sent a full RTT later.
Why not retransmit on the first duplicate ACK?
Because a duplicate ACK can come from reordering, not loss. Retransmitting too eagerly sends unnecessary copies and, worse, cuts the congestion window for nothing. Dupthresh and RACK's reordering window both exist to tell reordering from loss.
Does SACK make TCP immune to timeouts?
No. Losing the retransmissions themselves, losing every segment of a window, or losing the tail of a transfer can still need the timer. RACK and TLP reduce these cases, but don't eliminate them.
What's the difference between SACK and DSACK?
SACK reports out-of-order data that arrived beyond a hole. DSACK (RFC 2883) uses the same option to report data that arrived twice, which tells the sender a retransmission was unnecessary. Article 67 covers what senders do with that.
Is it worth disabling SACK for security or speed?
No. A 2019 Linux bug (CVE-2019-11477, "SACK Panic"; a CVE number is the public identifier for a security flaw) led some to disable SACK as a stopgap, but it has long been fixed. Without SACK, recovery from multiple losses takes one round trip per loss, as the lab showed.
Summary
- Duplicate ACKs signal a gap. Classic fast retransmit resends after 3 of them and halves the window instead of timing out.
- SACK blocks tell the sender exactly which data arrived. In the lab, three losses in one window were all resent together with SACK, and one per round trip without it (NewReno), finishing more than 100 ms later.
- Linux's default loss detection, RACK, marks a segment lost when data sent after it is delivered and more than an RTT plus a reordering window has passed. It caught the lab's loss after a single SACK.
- Tail loss probes resend the last segment after about two RTTs, so an ACK can reveal losses at the end of a transfer. In the lab, the probe went out at about 145 ms instead of a 300 ms RTO. In two of five trials it cut the completion time from about 390 ms to 240 ms; in three, segment 9 still needed the timeout.
Practice questions
1. A sender transmits segments 1 to 8, and segment 3 is lost. How many duplicate ACKs does the receiver send, and when does classic fast retransmit fire?
Answer
Segments 4 to 8 each produce a duplicate ACK for segment 3, five in all. Classic fast retransmit fires on the third one, triggered by segment 6's arrival.
2. Segments 10, 12 and 14 of a window are lost, and segments 11, 13 and 15 to 20 arrive. With SACK, what does the receiver report, and what does the sender do?
Answer
The cumulative ACK stays at segment 10. SACK blocks report 11, 13, and 15 to 20 (the most recent range first). The sender's scoreboard shows holes at 10, 12 and 14, and it can resend all three in the same round trip.
3. Why did NewReno take one round trip per loss in the lab?
Answer
Without SACK, the sender knows only the cumulative ACK. After resending segment 30, the next ACK moved forward only to segment 33, the next hole (a partial ACK). That told the sender 33 was missing, so it resent 33 and waited another round trip to discover 36.
4. A connection sends 3 segments, and the last one is lost. Why can't fast retransmit or RACK help on their own, and what does TLP do?
Answer
No segment was sent after the lost one, so no ACK or SACK can show that later data arrived. TLP resends the last segment after about two RTTs. If the probe arrives, its ACK completes the transfer without waiting for the RTO.
5. How can RACK detect that a retransmission was itself lost, when classic fast recovery can't?
Answer
RACK remembers each transmission's send time, including retransmissions. If data sent after the retransmission is SACKed and an RTT plus the reordering window has passed, the retransmission is declared lost and sent again. Classic fast recovery has no rule for a lost retransmission, so it must wait for the timeout.
Previous: Timeout-Based Retransmission and Exponential Backoff
Next: Spurious Retransmissions, Reordering and Duplication: DSACK, Eifel and F-RTO

More in TCP/IP Course
Quiz: TCP/IP Delicate Details
Twenty-five questions on the details that catch out experienced engineers: sequence numbers for SYN and FIN, TIME_WAIT versus tcp_fin_timeout, Karn's algorithm, socket buffer doubling, even and odd ephemeral ports, IPv6 checksums and fragmentation, negative DNS caching, and capture filter traps.
Quiz: TCP/IP Interview Questions
Thirty-three networking questions of the kind asked in developer, SRE and network engineering interviews: what happens when you load a URL, TCP versus UDP, handshakes, closing and TIME_WAIT, subnetting, NAT, DNS, MTU problems, congestion, TLS and QUIC, and debugging slow or failing connections.
Quiz: TCP/IP Course Final Exam (All Parts)
The final exam for the TCP/IP course: thirty questions across all fourteen parts, from packets and addressing through Ethernet, ARP, IP, DHCP, NAT, ICMP, UDP, DNS, TCP connections, reliability, congestion control, security, QUIC and troubleshooting.
Quiz: Modern Transports and Troubleshooting (TCP/IP Part 14)
Review modern transports and troubleshooting: QUIC packets, handshakes, 0-RTT, streams and connection migration, HTTP/3, Multipath TCP, SCTP multihoming, and a layered method for diagnosing real network faults.
Discussion
Sign in to ask a question or share what you learned.