Jamal Darbo// Security PortfolioPortfolio v1
Portfolio Blog
Back to blog

Networking

TCP retransmission and duplicate ACKs explained (Wireshark)

Follow a TCP recovery sequence in Wireshark to see why duplicate ACKs repeat, how retransmission fills a missing byte range, and when the acknowledgment advances.

A glowing gold data block filling a gap in a blue data stream

I have been writing quite a bit about network analysis lately. As a cybersecurity professional, I want to understand what happens when systems communicate, because that communication is part of so many investigations. A connection attempt, a response, or an unexpected interruption can tell us something useful, provided we understand what the packets actually show.

Strong networking fundamentals are essential for making sense of those observations. Understanding how DNS resolves names, how TCP handles delivery, and how routing connects networks helps us explain why traffic behaves the way it does. Without that foundation, it is easy to mistake normal protocol behavior for something suspicious or overlook a problem because we do not recognize what should have happened.

Knowing how normal traffic behaves also helps us recognize when something deserves a closer look, and my favorite tool, Wireshark, is perfect for this.

What I love about packet analysis is working through those details until the behavior starts to make sense.

TCP retransmissions are a good example. Packets can continue moving in both directions while the receiver is still waiting for an earlier piece of data. Wireshark highlights this with labels such as TCP Dup ACK and TCP Fast Retransmission, but those labels become much more useful when you can explain the behavior behind them. In this article, we will follow a small capture to see why the client repeats the same acknowledgment, how the server responds, and what tells us that the missing data has arrived.

I am using the TCP retransmission sample from OpenPCAP. It contains just 21 packets and was generated specifically for practice. This is a synthetic example, with dummy data rather than a recording of a real application session. OpenPCAP explains how its samples are constructed here.

The connection runs between client 192.168.1.50 and server 203.0.113.10. The server sends the data we will examine, while the client acknowledges it. Open the capture in Wireshark and apply:

tcp.stream == 0

Although, this technically doesn't matter because the whole capture is from the same stream. However, it is still a good habit to get into.

Keep the No., Source, Destination, and Info columns visible. The packet numbers below refer to this file, and the sequence and acknowledgment values use Wireshark's relative numbering.

The complete TCP conversation with duplicate ACKs and a fast retransmission
The complete TCP conversation, including three duplicate ACKs and a fast retransmission.

Finding the gap

Start with frame 7, where the client sends:

ACK = 2921
Frame 7 showing ACK 2921
Frame 7, with ACK 2921.

An acknowledgment number identifies the next byte the receiver expects in order. Here, the client has received the preceding bytes and is waiting for byte 2921. TCP acknowledgments are cumulative: they confirm receipt up to that point in the byte stream.

The next data visible in the capture, frame 8, begins at a different position:

Seq = 4381
Len = 1460
Frame 8 beginning at sequence number 4381
Frame 8.

That leaves a gap. The client was expecting byte 2921, remember? But this segment starts at byte 4381. The missing range is therefore 2921 through 4380, which is 1,460 bytes.

Wireshark marks frame 8 as:

TCP Previous segment not captured

You can read that label literally. It means Wireshark has encountered a sequence number beyond the data it expected to see. It does not establish where a packet was lost. As mentioned, this capture is synthetic, but in a real capture missing data could also reflect packets that the capture process did not record. These labels are generated from Wireshark's analysis of the available packets.

For this exercise, the missing range is the problem around which the sample is built. The original transmission of those bytes is absent from the file, so there is no earlier packet we can select and compare with the later retransmission.

The server then sends more data. Frame 10 starts at 5841, and frame 12 starts at 7301. Those segments follow the data in frame 8, but neither supplies the bytes beginning at 2921.

Frames 10, 11, and 12 in the Wireshark packet list
Frame 10, 11, and 12.

Why the client keeps sending the same ACK

After frame 8, the client responds in frame 9 with:

ACK = 2921
Frame 9 repeating ACK 2921
Frame 9 with ACK 2921.

The number has not advanced. More data has arrived, but the gap remains.

A useful way to read this response is: "I received data beyond the gap, but I am still waiting for byte 2921." The receiver cannot advance its cumulative acknowledgment past the missing bytes.

The same pattern continues:

Incoming server dataClient responseWireshark label
Frame 8, Seq = 4381Frame 9, ACK = 2921TCP Dup ACK 7#1
Frame 10, Seq = 5841Frame 11, ACK = 2921TCP Dup ACK 7#2
Frame 12, Seq = 7301Frame 13, ACK = 2921TCP Dup ACK 7#3

Frame 7 is the original acknowledgment. Frames 9, 11, and 13 repeat it, giving us three duplicate ACKs.

Frames 7 through 13 showing later data and repeated acknowledgments
Frame 7 to 13, showing the same pattern.

In this example, "duplicate" describes the repeated acknowledgment information. The client sends a new ACK as each later segment arrives. We are not looking at one ACK packet accidentally copied three times.

Apply this filter to keep the data and its responses together:

frame.number >= 7 && frame.number <= 13
Wireshark showing the missing byte range and duplicate ACKs
Later data arrives, but the client repeats ACK 2921 because the same gap remains.

These responses provide feedback before a timeout occurs. The sender can see that later data is reaching the receiver while an earlier part of the stream remains unacknowledged.

A duplicate ACK alone does not prove that a segment was lost. Reordering can also produce this behavior: a segment might arrive late while others pass it.

Filling the gap

The server responds in frame 14:

Seq = 2921
Len = 1460

Wireshark labels this packet TCP Fast Retransmission.

Frame 14 marked as a TCP Fast Retransmission
Frame 14, TCP Fast Retransmission.

A retransmission sends previously transmitted data again. Here, the segment begins exactly where the client's acknowledgment stopped advancing. Its 1,460 bytes cover the missing range:

2921 through 4380

The server does not restart the connection or resend all the data in the capture. This segment supplies the particular range the client was waiting for.

Select frame 14 and expand Transmission Control Protocol in the packet details. Look at the Sequence Number and TCP Segment Len fields. These values explain the purpose of the packet more directly than its analysis label alone.

Expanded TCP details for frame 14
Frame 14 packet details.

“Fast” refers to recovery driven by acknowledgment feedback before the retransmission timeout. TCP also maintains a retransmission timer. If that timer expires, the sender retransmits the earliest unacknowledged segment. That provides another route to recovery when enough duplicate ACK feedback is unavailable.

The most revealing packet comes next. In frame 15, the client sends:

ACK = 8761

Why does the acknowledgment jump from 2921 to 8761, rather than stopping at 4381?

The sample illustrates a receiver that has kept the later data while waiting for the gap to be filled. Once frame 14 supplies the missing bytes, those pieces form a continuous range:

Data supplied byByte range
Frame 14, filling the gap2921–4380
Frame 8, already received4381–5840
Frame 10, already received5841–7300
Frame 12, already received7301–8760

The next expected byte is now 8761. One acknowledgment covers the newly supplied bytes and the later data that was already available.

The larger ACK does not mean frame 14 carried all those bytes. It shows how filling one gap allows the cumulative acknowledgment to move across several segments.

To see the exchange visually, apply:

frame.number >= 7 && frame.number <= 15

Then open Statistics → Flow Graph, enable Limit to display filter, and select TCP Flows. This keeps the graph focused on the acknowledgments, the gap, and its recovery.

Flow Graph showing duplicate ACKs, retransmission, and ACK 8761
Three duplicate ACKs are followed by the missing data and an acknowledgment advancing to 8761.

When reading other captures, remember that TCP Dup ACK and TCP Fast Retransmission are Wireshark annotations, not flags transmitted in the TCP header. Their interpretation depends on the packets Wireshark can observe. Keep the surrounding traffic visible so you can check what prompted the label.

In this sample, the recovery is visible in a handful of numbers: 2921 remains the next expected byte while later segments arrive, frame 14 fills that gap, and the acknowledgment advances to 8761.

The application receives an ordered byte stream even when the network does not deliver every segment in order. This capture lets us see the work behind that behavior: the receiver reports where progress has stopped, and the sender supplies the bytes needed to continue.

All in all, I really love working with Wireshark. It is a great learning tool, and even a small capture like this can make networking concepts much easier to understand.

Sources