4.3.20 · D1Computer Networks

Foundations — TCP reliability — seq - ack numbers, retransmission, cumulative ACK

1,883 words9 min readBack to topic

This page is the ground floor. Before you read the parent topic (or its English version), you should be able to point at every symbol it uses and say what it means, what it looks like, and why it's there. We build each idea from nothing, in an order where every new thing only leans on things already defined.


0. What is a "byte"? (the atom we count)

Figure — TCP reliability — seq - ack numbers, retransmission, cumulative ACK

Why the topic needs this: everything TCP does is about these beads — labelling them, confirming them, resending lost ones. If you don't picture a byte as a bead on an ordered string, none of the numbers make sense.


1. "Position on the string" — the idea a sequence number captures

Before we write any TCP symbol, notice the string above already has a hidden ruler: each bead sits at a position. The 1st bead is position 1, the 2nd is position 2, and so on.

Why the topic needs this: TCP labels bytes by position, not packets. That is the whole trick that makes resending and reordering safe. This "position" idea is what the symbol SEQ (next section) will name.


2. SEQ — the sequence number

Figure — TCP reliability — seq - ack numbers, retransmission, cumulative ACK

3. ISN — where the numbering starts

The +1 rule you'll meet: the SYN and FIN control flags each consume one position (as if they were one phantom bead). That's why the reply to a SYN carrying ISN acknowledges — you'll see this exact again in the next section.


4. ACK — the acknowledgement number

Here is the cleverest symbol, so we build it slowly.

Notice this is the same pattern from the ISN section — "the thing I got, plus one, is the thing I want next."

Figure — TCP reliability — seq - ack numbers, retransmission, cumulative ACK

5. RTT and RTO — the two time symbols

Why both symbols are needed: RTT is the observed travel time; RTO is the decision threshold built from it. Confusing them makes the retransmission logic in the parent note unreadable.


6. The averaging symbols: , , SRTT, RTTVAR

The parent uses a smoothing formula. Here are its pieces, each in plain words.

You don't need to master Jacobson's algorithm here — just recognise these four names when the parent uses them.


Prerequisite map

Byte = one bead on a string

Stream position of each byte

SEQ = position of first byte in a segment

Interval SEQ to SEQ plus L

ISN = random start position

ACK = next byte expected = k plus 1

Cumulative ACK covers whole prefix

Duplicate ACK = stuck on a gap

RTT measured travel time

RTO patience limit

SRTT and RTTVAR smoothing

TCP reliability topic 4.3.20

Once these boxes feel obvious, jump to the parent: 4.3.20 TCP reliability — seq - ack numbers, retransmission, cumulative ACK (Hinglish). Related deeper roads: Sliding window flow control, Selective ACK (SACK), Go-Back-N vs Selective Repeat, TCP congestion control, and the layer beneath it all, IP unreliable datagram service.


Equipment checklist

A byte in TCP is best pictured as
one bead on an ordered left-to-right string (one character of the stream).
What does SEQ mean in one sentence?
the stream position of the first data byte in that segment.
The interval contains how many bytes, and which is the last?
exactly bytes; the last is (byte belongs to the next segment).
Why does numbering start at a random ISN instead of 0?
so stale segments from an old connection can't masquerade as new data, and to resist sequence-guessing attacks.
Give the ACK formula and read it aloud.
where is the highest contiguous byte — "I have everything below ACK, send ACK next."
Why does a gap freeze the ACK even though later bytes arrived?
those later bytes are buffered, not contiguous; the highest gap-free position hasn't moved, so the next-expected number is unchanged.
What is a duplicate ACK and what does it hint?
the same ACK sent again because the receiver is stuck behind a missing byte — a hint that one segment was lost while later ones arrived.
Difference between RTT and RTO?
RTT is the measured round-trip travel time; RTO is the decision threshold (RTT + safety margin) after which the sender assumes loss and resends.
What does the arrow mean in ?
"becomes" — assignment; the new SRTT is mostly the old average nudged toward the new sample .