Intuition The ONE core idea
TCP takes an unreliable postman (IP, which loses and shuffles packets) and builds a reliable, in-order stream of numbered bytes on top of it. Everything else — sequence numbers, ACKs, timers, retransmission — is just bookkeeping that answers two questions: "which byte is this?" and "which byte do you want next?"
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.
A byte is one small unit of data — think of it as one character of a message, like the letter H. When an app "sends data", it really hands TCP a long line of bytes, one after another, like beads on a string.
Intuition The picture: a bead string
Picture the whole conversation as a string of beads laid left to right. The first bead the app ever sends is at the far left; each new byte is threaded on to the right. TCP never rearranges the string — it just makes sure every bead arrives and stays in this order.
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.
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.
Definition Stream position
The stream position of a byte is how far along the string it sits , counting from the start. It is a fixed identity: bead number 1057 is always bead number 1057, no matter how it travels.
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.
Definition SEQ (sequence number)
A packet (TCP calls it a segment ) carries a chunk of consecutive beads. Its SEQ is the stream position of the first bead in that chunk . It answers: "where on the string does this chunk begin?"
Worked example Reading the interval notation
A segment with SEQ = 1000 carrying L = 100 bytes covers [ 1000 , 1100 ) = positions 1000 through 1099. The next segment in order starts at 1000 + 100 = 1100 .
[ 1000 , 1100 ) includes byte 1100."
Why it feels right: both numbers are written down, so both look included.
The fix: the ) means up to but not including 1100. Byte 1100 is the first byte of the next segment. Counting 1000…1099 gives 100 bytes, matching L = 100 .
Definition ISN (Initial Sequence Number)
The string's positions do not start at 0 or 1. Each side rolls a random starting number, the ISN , at connection setup (during the TCP three-way handshake ). Byte number one of your data sits at ISN + 1 , not at 1.
Intuition Why random, in one picture
Imagine two old letters from a previous conversation between the same two houses, still stuck in the mail. If numbering always restarted at the same value, a stale letter could look like a brand-new one and corrupt the stream. A random starting position makes such a collision astronomically unlikely — and makes it hard for an attacker to guess valid positions.
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 x acknowledges x + 1 — you'll see this exact + 1 again in the next section.
Here is the cleverest symbol, so we build it slowly.
Intuition What "acknowledge" should mean
The receiver wants to tell the sender what got through . The lazy-but-genius choice: instead of listing every bead received, report the position of the next bead you still want . Saying "send me bead 1100 next" secretly proves "I already have everything before 1100."
Definition ACK (cumulative acknowledgement number)
Let k be the highest position the receiver has received with no gaps below it (a solid run from the start). The ACK it sends is
ACK = k + 1 ,
the next byte expected . It confirms the entire run < ACK at once — this is why it's called cumulative .
Notice this is the same + 1 pattern from the ISN section — "the thing I got, plus one, is the thing I want next."
Definition Contiguous vs buffered
Contiguous beads: an unbroken run from the start with no holes . Only these advance the ACK.
Buffered beads: beads that arrived after a hole. The receiver keeps them on its desk but cannot count them yet, because a bead in between is missing.
Worked example Why a gap freezes the ACK
Beads 1000–1099 arrive (contiguous → ACK = 1100). Then 1200–1299 arrive but 1100–1199 are missing. The highest contiguous position is still 1099, so the ACK is still 1099 + 1 = 1100 . The receiver buffers the 1200s but repeats ACK 1100 — a duplicate ACK . This "stuck" repeated number is exactly the loss-hint that triggers fast retransmit in the parent note.
Common mistake "ACK = the last byte I received."
Why it feels right: "acknowledge" sounds like "confirm the last thing that arrived."
The fix: ACK is the next byte wanted = last contiguous byte + 1 . Drop the +1 and the sender resends that byte forever.
Definition RTT (Round-Trip Time)
The RTT is how long a bead takes to travel to the receiver and its ACK to travel back. Picture a stopwatch started when you send, stopped when the ACK returns. See RTT estimation / Jacobson's algorithm for how TCP measures this noisy quantity.
Definition RTO (Retransmission Timeout)
The RTO is the patience limit: "if no ACK arrives within RTO, assume the bead was lost and resend it." It must be a bit longer than the RTT (a bead that's merely slow isn't lost yet), so RTO = smoothed RTT + a safety margin for jitter.
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.
The parent uses a smoothing formula. Here are its pieces, each in plain words.
Definition The four symbols
SRTT (Smoothed RTT): a running average of RTT, so one weird sample doesn't panic TCP.
RTTVAR : a running measure of how jumpy the RTT is (its typical wobble).
α (alpha), β (beta): small fractions (typically α = 8 1 , β = 4 1 ) that set how fast the average forgets old samples . Bigger α = react faster but noisier; smaller = smoother but slower.
You don't need to master Jacobson's algorithm here — just recognise these four names when the parent uses them.
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
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 .
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 [ SEQ , SEQ + L ) contains how many bytes, and which is the last? exactly L bytes; the last is SEQ + L − 1 (byte SEQ + L 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. ACK = k + 1 where k 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 SRTT ← ( 1 − α ) SRTT + α R ? "becomes" — assignment; the new SRTT is mostly the old average nudged toward the new sample R .