Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= bits-per-second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is ______.
GATE 2018 CS Q.25: solution and answer
Answer and solution
ANSWER
The sequence number can be reused after at least about 34.36 seconds, which rounds to 34 seconds.
Official answer: 34 to 35Source: Official answer key, GATE 2018 CS (IIT Guwahati)
TCP numbers every byte of the data stream, and the sequence number field is 32 bits wide. A sequence number can therefore take distinct values and wraps around after bytes.
The starting value 1234 does not matter. The same sequence number comes round again only after exactly bytes have been sent, whatever the starting point.
Data to be sent, in bits: bits.
The sender cannot push data faster than the link bandwidth, bits per second, so the minimum time is the one at full bandwidth.
Rounded to the closest integer, the time is 34 seconds.
KEY IDEA
TCP sequence numbers count bytes in a 32-bit field, so they wrap after bytes. The minimum reuse time is the time to send bytes at full link speed.
WATCH OUT FOR
Counting bits instead of bytes (forgetting the factor of 8) gives about 4.29 seconds. Another slip is subtracting the starting value 1234, which is irrelevant to the wrap-around time.
From the GATE 2018 CS paper. Every question of this paper · Download the full paper · All 12 TCP questions, with notes
More TCP questions
- GATE 2026 CS1 Q.18 · MCQ · 1 markWith respect to a TCP connection between a client and a server, which one of the following statements is true?
- GATE 2026 CS1 Q.44 · MCQ · 2 marksA TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of…
- GATE 2026 CS2 Q.58 · NAT · 2 marksConsider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at…
- GATE 2025 CS1 Q.22 · MSQ · 1 markConsider the 3-way handshaking protocol for TCP connection establishment.
