GATE / CS ARCHIVE

GATE CSE 2024 SET 1 / QUESTION 29

TCP SYN sequence-space accounting

Computer Networks · Transport, Congestion Control & Traffic Shaping · Full GATE CSE 2024 Set 1 paper

GATE 2024 Set 1, Q29 1 mark · MSQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 29, GATE 2024: Client P successfully connects to TCP server Q. NP is the sequence number in P's SYN; NQ is the acknowledgment number in Q's SYN-ACK. Which claims are correct? A NP is randomly chosen by P. B NP is always 0 for a new connection. C NQ=NP. D NQ=NP+1.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, D

Approach: Separate the choice of the initial sequence number from the rule for acknowledging a SYN.
1. A new TCP connection does not always begin at sequence number zero. The initial sequence number is chosen by the endpoint using a scheme intended to make it difficult to predict and to separate old connection traffic from new traffic. This is the randomized or pseudorandom selection described by A; B is false.
2. TCP acknowledgment numbers identify the next sequence number expected from the peer. A SYN consumes one position in sequence space even though it is not an ordinary payload byte.
3. After receiving a SYN with sequence NP, Q therefore acknowledges NP+1, with arithmetic modulo 2³². This makes D true and C false.
Answer: A and D. Actual initial-sequence algorithms may combine a clock with a keyed pseudorandom function; the key's “randomly” should not be read as requiring a fresh independent uniform draw.

Original paper, page 19 · Answer key