IAE Academy

GATE 2018 CS Q.25: solution and answer

GATE 2018 · CSQ.25 · 1 mark · NAT

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 ______.

See the question in the paper

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)

  1. 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.

  2. 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.

  3. Data to be sent, in bits: bits.

  4. The sender cannot push data faster than the link bandwidth, bits per second, so the minimum time is the one at full bandwidth.

  5. 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