GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER NETWORKS

Size byte sequence space against wraparound

4 questions solved the same way, newest first. Back to Computer Networks

How these are solved

Convert bitrate to bytes per second and require sequence space to cover bytes sent during the specified lifetime; compute wrap time or ceil(log2) field width. The 2026 link also imposes full utilization; check that the lifetime bound dominates its bandwidth-delay bound.

2 marks · NAT
Report issue

Sequence-number space for a full-rate link

Transport, Congestion Control & Traffic Shaping

Question 65, GATE 2026: Two hosts use a lossless 3000 km link of bandwidth 10⁸ bits/s and propagation delay 5 ns/m. Every data byte gets a sequence number. Find the minimum sequence-field width N so numbers do not wrap before 60 s and full utilization is possible.
Tap to enlarge
Answer & solution

Official answer: 30

Givens and goal

Two hosts use a lossless 3000 km link of bandwidth 10⁸ bits/s and propagation delay 5 ns/m. Every data byte gets a sequence number. Find the minimum sequence-field width N so numbers do not wrap before 60 s and full utilization is possible.

Approach

Compare the long-term no-wrap requirement with the in-flight window requirement.

Step-by-step solution

1. At full rate the byte rate is 10⁸/8=12.5×10⁶ bytes/s. In 60 seconds the sender transmits 60×12.5×10⁶=750,000,000 bytes, requiring at least that many distinct sequence numbers before reuse.
2. An N-bit field has 2N possible values. Since 2²⁹=536,870,912<750,000,000 and 2³⁰=1,073,741,824≥750,000,000, the no-wrap condition requires N≥30.
3. Convert the link length to 3,000,000 m. One-way propagation is 3,000,000×5 ns=15 ms, so propagation round trip is 30 ms when other delays are ignored.
4. The bandwidth-delay product for that round trip is 12.5×10⁶×0.030=375,000 bytes. A window supporting that many outstanding bytes can keep the link busy. Even a selective-repeat-style sequence-space requirement of twice that window is only 750,000 values, far below 2³⁰.
5. Thus the 60-second nonwrapping condition dominates and N=30. This uses the question’s idealized data rate and ignores unspecified header, acknowledgement-transmission, and processing overhead; those details are not needed to overturn the much larger no-wrap bound.

Original paper, page 42 · Answer key

2 marks · MSQ
Report issue

Transport, Congestion Control & Traffic Shaping

Question 50, GATE 2023: A TCP-like byte-stream protocol runs at 100 Mbps, RTT 150 ms, and maximum segment lifetime 2 minutes. Which sequence-number field lengths prevent reuse within a segment lifetime at full rate? A 30 bits; B 32; C 34; D 36.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C, D

At100Mbps a byte-stream consumes 100×10⁶/8=12.5×10⁶ sequence numbers per second. During the 120-second maximum segment lifetime it can send 1.5×10⁹ bytes. The sequence space must exceed that count to avoid wraparound while old data can still exist. Since2³⁰≈1.074×10⁹ is too small and 2³¹≈2.147×10⁹ is sufficient, the listed 32-, 34-, 36-bit fields work, but 30 bits does not. Thus B, C, D. RTT affects window sizing, not this lifetime wraparound bound.

Teaching detail. Sequence numbers label bytes, not bits or whole packets, so the conversion from 100 megabits/second to bytes/second is essential. For b bits, wrap time is 2b/(12.5×106) seconds; it must exceed 120 seconds in the intended model. A 30-bit space wraps in about 85.9 seconds, whereas 32 bits lasts about 343.6 seconds. The mathematical minimum is 31 bits, which is absent from the offered choices; that does not make 32 the sole valid answer, because larger listed fields also work.

Original paper, page 53 · Answer key

2 marks · NAT
Report issue

Transport, Congestion Control & Traffic Shaping

Question 60, GATE 2022: TCP sends over 1 Gbps with maximum segment lifetime 60 seconds. What minimum sequence-number bit width avoids wrapping during that lifetime?
Tap to enlarge
Answer & solution

Official answer: 33

TCP sequence numbers identify bytes. At 109 bits per second, the stream uses 109/8=125000000 sequence numbers per second and 7500000000 in 60 seconds. A nonwrapping sequence space must accommodate that many distinct bytes during the MSL. Since 232=4294967296 is too small but 233=8589934592 is enough, 33 bits are required.

The bound is 2b≥rate_in_bytes_per_second×MSL. Taking a ceiling gives b=ceil(log2(7.5×109))=33. Counting bits rather than bytes would give the wrong sequence-space requirement because TCP increments sequence numbers per payload byte.

Original paper, page 39 · Answer key

1 mark · NAT
Report issue

TCP sequence-number wrap time

Transport, Congestion Control & Traffic Shaping

Question 25, GATE 2018: A long-lived TCP connection sends at 10^9 bits/s and starts at sequence number 1234. Find the minimum time in seconds before that number can recur, rounded to an integer.
Tap to enlarge
Answer & solution

Official answer: 34 to 35

Our answer: 34 seconds

Method

A TCP sequence number labels a byte, so a full modulo-2^32 cycle consumes 4294967296 bytes, or 34359738368 bits. Divide by the bit rate, maintaining consistent units. The initial value 1234 affects which label comes first, but not how many increments return to it. This is a sequence-space throughput calculation; it does not independently establish that reusing the number is safe from delayed old packets.

Solution

TCP sequence numbers count bytes modulo 232. At109 bits/s, consuming the full sequence space requires 232·8/109≈34.359738 seconds, rounded 34. The starting number 1234 only shifts the cycle and does not change its length.

Original paper, page 10 · Answer key