Back to the 2015 paper

Module 4: Transport Layer & Congestion Control

20157m

TCP is sending data at 2 Mbytes/sec. If the sequence number starts with 7000, how long does it take before the sequence number goes back to zero?

Worked SolutionAI Assisted

TCP Sequence Number Wrap-Around Time

Given:

  • Data rate = 2 Mbytes/sec
  • Initial sequence number = 7000
  • TCP sequence numbers are 32 bits, so the sequence number space is 232=4,294,967,2962^{32} = 4{,}294{,}967{,}296 bytes.

Step 1 — Bytes that must be sent before the number returns to 0

The sequence number wraps to 0 only after the entire 32-bit space is exhausted. Starting at 7000, the bytes still to be sent are:

N=232−7000=4,294,967,296−7000=4,294,960,296 bytesN = 2^{32} - 7000 = 4{,}294{,}967{,}296 - 7000 = \mathbf{4{,}294{,}960{,}296 \text{ bytes}}

Step 2 — Convert the data rate to bytes/sec

Taking 1 Mbyte = 2202^{20} bytes = 1,048,576 bytes:

R=2×1,048,576=2,097,152 bytes/secR = 2 \times 1{,}048{,}576 = 2{,}097{,}152 \text{ bytes/sec}

Step 3 — Time = Data / Rate

T=4,294,960,2962,097,152≈2047.997 sT = \frac{4{,}294{,}960{,}296}{2{,}097{,}152} \approx 2047.997 \text{ s}

T≈2048 s≈34 min 8 s\boxed{T \approx 2048 \text{ s} \approx 34 \text{ min } 8 \text{ s}}

(Sanity check: 232/221=211=20482^{32} / 2^{21} = 2^{11} = 2048 s exactly; the initial 7000 bytes shave off only ~0.003 s, so the answer is essentially 2048 s.)

Alternative convention: if "Mbyte" is read as 10610^6 bytes, then R=2,000,000R = 2{,}000{,}000 B/s and

T=4,294,960,2962,000,000≈2147.5 s≈35.8 minT = \frac{4{,}294{,}960{,}296}{2{,}000{,}000} \approx 2147.5 \text{ s} \approx 35.8 \text{ min}

Final answer: ≈ 2048 seconds (about 34 minutes) for 1 Mbyte = 2202^{20} bytes (≈ 2147.5 s if 1 Mbyte = 10610^6 bytes).

Note: this long wrap time is exactly why TCP may safely use a reduced window (e.g., window scaling / TCP timestamps) to disambiguate old from new segments — with wrap taking ~34 minutes, no segment can survive that long.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.