Computer Networks · TEE · practice
TCP sequence and ACK arithmetic · example 2
Unit 5 · Process delivery, UDP, TCP and SCTP · optional practice
Optional extension · no matching calculation in the two supplied papers
Optional worked extension. This calculation format was not found in the supplied December 2025 final or February 2026 re-exam. The numbers and practice marks are authored. Study the core concept and actual-paper questions first; this is extra explanation, not a TEE prediction.
Practice question. A client SYN has Seq=99; the server SYN has Seq=700. No handshake data is sent. The client then sends 500 bytes in one segment and immediately finishes its sending direction. Find handshake ACKs, data-byte range, data ACK and FIN ACK. [5 practice marks]
Answer
Given
Client ISN=99; server ISN=700; data=500 B; no sequence wrap or loss.
To find
Each sequence/acknowledgement boundary.
Formula and why
\mathrm{first}=ISN+1,\quad \mathrm{next}=\mathrm{first}+LSYN and FIN consume one sequence value each; data consumes one value per byte; an empty ACK consumes none.
Step-by-step solution
Step 1. Acknowledge SYNs
Server ACK=100; client ACK=701.
Step 2. Number the data
First byte=100; last=100+500−1=599.
Step 3. Acknowledge data
Next expected byte=599+1=600; receiver sends ACK=600.
Step 4. Acknowledge FIN
Client FIN Seq=600; FIN ACK=601.
Final answer: Handshake ACKs 100 and 701; data 100…599; data ACK 600; FIN ACK 601.