Sequence & Acknowledgement Numbers
How TCP counts every byte — and never loses track
Step 1 of 2 — understand the idea. Read this first and the packet trace will confirm what you already expect, instead of teaching you two things at once.
What you'll be able to do
- ▸Predict the sequence number of any segment from what came before
- ▸Read an acknowledgement number as 'the next byte I expect'
- ▸Show that each direction of the stream is numbered independently
✗ Common misunderstanding: Sequence numbers count packets — packet 1, packet 2, packet 3…
Why that's wrong: They count BYTES of the stream. Two packets carrying 1460 bytes each are numbered 1000 and 2460 — a gap of 1460, not 1.
Correct model: A sequence number is the position of a byte in that direction's stream, like a page number in a very long book. Packets are just how the pages get shipped.
The packets prove it: In the data-transfer trace, the second segment's sequence number is the first one's plus its payload length — never plus one.
✗ Common misunderstanding: The acknowledgement number identifies the packet being acknowledged.
Why that's wrong: It names the next BYTE the receiver wants. It frequently corresponds to no packet boundary at all, and one ACK can cover many packets.
Correct model: Read every ACK as a sentence: “I have everything before this number; send me this byte next.”
The packets prove it: After a 43-byte request, the server's ACK is ISN+1+43 — a byte position. In the SACK lesson one ACK jumps across eight segments at once.
Watch these fields in the lab: tcp.sequenceNumber · tcp.ackNumber
The rules, then a worked case:
1. Payload bytes → consume that many numbers 2. SYN → consumes 1 3. FIN → consumes 1 4. Pure ACK (no data)→ consumes 0 5. Retransmission → reuses the ORIGINAL numbers Sender transmits 500 bytes starting at sequence number 1000. Bytes on the wire: 1000 through 1499 Receiver replies: ACK = 1500 Meaning: “I have everything through 1499; send 1500 next.”
ACK 1500 — not 1499, and not 'packet 3'. The acknowledgement names the next byte wanted, always.
Watch these fields in the lab: tcp.sequenceNumber · tcp.ackNumber · tcp.payload
✓ Concept check — before you open the packets
These test the idea, not the trace. You should be able to answer them from the explanation above.
Now that you understand the concept, observe how it appears in the packet exchange.
The lab runs a real simulated capture — pause, step, click any packet, and inspect every byte.