IAE Academy

GATE 2023 CS Q.50: solution and answer

GATE 2023 · CSQ.50 · 2 marks · MSQ

Suppose you are asked to design a new reliable byte-stream transport protocol like TCP. This protocol, named myTCP, runs over a 100 Mbps network with Round Trip Time of 150 milliseconds and the maximum segment lifetime of 2 minutes.

Which of the following is/are valid lengths of the Sequence Number field in the myTCP header?

  1. (A)

    30 bits

  2. (B)

    32 bits

  3. (C)

    34 bits

  4. (D)

    36 bits

See the question in the paper

Answer and solution

ANSWER

Valid lengths are 32, 34 and 36 bits (options B, C, D); 30 bits is too short.

Official answer: B, C, DSource: Official answer key, GATE 2023 CS (IIT Kanpur)

  1. A byte-stream protocol numbers every byte. A sequence number must not be reused while an old segment carrying it can still be alive in the network, so the sequence space must not wrap around within the maximum segment lifetime (MSL).

  2. Link rate: bytes/s. MSL .

  3. Bytes that can be sent in one MSL: bytes. The sequence space must be at least this large, so . Since , at least 31 bits are needed.

  4. A more conservative design allows for a stale segment living one MSL and its acknowledgement another MSL, so the numbers must stay unique over MSL: bytes. Then , so at least 32 bits are needed.

  5. Window check: the bandwidth-delay product is bytes, far below for , so the window size does not restrict the choice.

  6. 30 bits gives only bytes, so the numbers wrap within a single MSL under either reading. Option A is invalid.

  7. 32, 34 and 36 bits each give , so they satisfy even the conservative requirement. A longer field only enlarges the sequence space and never causes reuse within the MSL, so these lengths are all valid. Options B, C and D are correct.

KEY IDEA

The sequence number space must not wrap around within the maximum segment lifetime: bytes sent in one MSL are , so the field needs more than 30 bits, and any length of 32 bits or more is safe.

WATCH OUT FOR

Counting bits from the bandwidth-delay product (about bytes, roughly 21 bits) instead of the bytes sent in one MSL, or treating only the smallest length as valid and ignoring that longer fields are also valid.

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

More TCP questions