IAE Academy

GATE 2022 CS Q.60: solution and answer

GATE 2022 · CSQ.60 · 2 marks · NAT

Consider the data transfer using TCP over a 1 Gbps link. Assuming that the maximum segment lifetime (MSL) is set to 60 seconds, the minimum number of bits required for the sequence number field of the TCP header, to prevent the sequence number space from wrapping around during the MSL is ______.

See the question in the paper

Answer and solution

ANSWER

The sequence number field needs at least 33 bits.

Official answer: 33Source: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. TCP numbers every byte, so the sequence number space must be at least as large as the number of bytes the sender can transmit within one MSL. Otherwise a sequence number could repeat while an old segment with that number is still alive in the network.

  2. Link rate bits/s bytes/s.

  3. Bytes sent in one MSL bytes.

  4. We need .

  5. So the minimum number of bits is .

KEY IDEA

TCP numbers bytes, not segments. The sequence number space must cover every byte the link can send in one MSL, so .

WATCH OUT FOR

Using the rate in bits per second (, which gives 36 bits). TCP sequence numbers count bytes, so the rate must first be divided by 8.

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 12 TCP questions, with notes

More TCP questions