Suppose you are asked to design a new reliable byte-stream transport protocol…

2023

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

Attempted by 35 students.

Show answer & explanation

Correct answer: B, C, D

Answer summary: The valid sequence number field lengths from the choices are 32 bits, 34 bits, and 36 bits. 30 bits is too small.

Reasoning:

  • Key requirement: The sequence number space must be larger than the total amount of data that can be transmitted (and remain in the network) during the maximum segment lifetime (MSL). Otherwise sequence numbers could wrap and old packets might be mistaken for new data.

  • Compute link throughput in bytes per second: 100 Mbps = 100×10^6 bits/s = 12.5×10^6 bytes/s.

  • Maximum segment lifetime: 120 s. Data that can be sent during MSL ≈ 12.5×10^6 bytes/s × 120 s = 1.5×10^9 bytes.

  • Find minimal k such that 2^k > 1.5×10^9. log2(1.5×10^9) ≈ 30.48, so k must be at least 31 bits.

  • Therefore any sequence number field length ≥ 31 bits is acceptable. From the provided choices, 32 bits, 34 bits, and 36 bits meet this requirement; 30 bits does not.

Note:

  • Round-trip time (150 ms) is not directly needed for this MSL-based sequence-space calculation; RTT matters when sizing send windows but not for avoiding wraparound within MSL.

  • Practical remark: standard TCP uses a 32-bit sequence number field, which in this scenario is sufficient because 2^32 ≈ 4.29×10^9 bytes > 1.5×10^9 bytes.

Explore the full course: Gate Guidance By Sanchit Sir