The GATE Grind

GATE 2023 CS – Question 50

Computer Networks · TCP: Flow Control, Congestion Control, Socket API · 2 marks · Multiple select

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. 30 bits
  2. 32 bits
  3. 34 bits
  4. 36 bits

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) 32 bits; (C) 34 bits; (D) 36 bits

Explanation

myTCP numbers every **byte**. To avoid confusion between old and new bytes, the sequence numbers must not wrap around within the maximum segment lifetime (MSL = 2 minutes = 120 s).

Data that can be sent in 120 s at 100 Mbps:
$$\frac{100\times10^6}{8}\text{ bytes/s}\times120\text{ s}=12.5\times10^6\times120=1.5\times10^9\text{ bytes}.$$

So the sequence number space must be larger than $1.5\times10^9$: $2^n>1.5\times10^9$. Since $2^{30}\approx1.07\times10^9<1.5\times10^9\le2^{31}\approx2.15\times10^9$, we need $n\ge31$.

Valid lengths: 32, 34, 36 bits (not 30). Answer: B, C, D.

More TCP: Flow Control, Congestion Control, Socket API questions

All TCP: Flow Control, Congestion Control, Socket API questions →