TCP Sequence Number Wraparound Time at 2 Mbytes/sec

TCP Sequence Number Wraparound Time at 2 Mbytes/sec

Verified Sources
Nov 4, 2026

In TCP, the Sequence Number identifies the byte stream position. The sequence number field is 32 bits, so it conceptually wraps modulo 2322^{32} bytes: after reaching 232−12^{32}-1, the next increment goes back to 00 2.

Given:

  • Sending rate: 22 Mbytes/sec
  • Initial sequence number value: starts with 70007000, i.e., we model it as 70007000
  • We want the time until the sequence number returns to zero

We interpret “goes back to zero” as the sequence number field wrapping after the sender transmits enough data bytes such that the sequence number advances by 2322^{32} bytes (because wrap is modulo 2322^{32}) 2.

We compute:

  1. Remaining bytes until wrap from 70007000 to 00 (inclusive wrap accounting): bytes to wrap=232−7000\text{bytes to wrap} = 2^{32} - 7000
  2. Convert the rate 22 Mbytes/sec to bytes/sec: Here we use 11 Mbyte =106= 10^6 bytes (common in such problems unless stated otherwise): 2 Mbytes/sec=2×106 bytes/sec2\ \text{Mbytes/sec} = 2\times 10^6\ \text{bytes/sec}
  3. Time: t=232−70002×106 sect=\frac{2^{32}-7000}{2\times 10^6}\ \text{sec}

Mermaid intuition for wraparound:

Footnotes

  1. RFC 793 — Transmission Control Protocol - Defines the TCP sequence number field and sequence space behavior. ↩ ↩2

  2. RFC 793 — Sequence Numbers (32-bit) and wraparound behavior - Specifies the 32-bit nature and modulo arithmetic for sequence handling. ↩ ↩2

Compute time until TCP sequence number wraps to 0

  1. 1
    Step 1

    TCP sequence numbers are 32-bit and wrap modulo 2322^{32}, so returning to 0 occurs after advancing by 2322^{32} bytes from a given starting point 2.

    Footnotes

    1. RFC 793 — Transmission Control Protocol - Defines the TCP sequence number field and sequence space behavior. ↩

    2. RFC 793 — Sequence Numbers (32-bit) and wraparound behavior - Specifies the 32-bit nature and modulo arithmetic for sequence handling. ↩

  2. 2
    Step 2

    If the sequence number starts at 70007000, the remaining advancement to wrap is 232−70002^{32}-7000 bytes.

  3. 3
    Step 3

    With 22 Mbytes/sec and using 11 Mbyte =106=10^6 bytes, the rate is 2×1062\times 10^6 bytes/sec.

  4. 4
    Step 4

    Time is t=(232−7000)/(2×106)t=(2^{32}-7000)/(2\times 10^6) seconds; evaluate numerically for the final answer.

  5. 5
    Step 5

    Provide the value in seconds (and optionally convert to hours/days for intuition).

Now evaluate:

232=4,294,967,2962^{32}=4,294,967,296 t=4,294,967,296−7,0002,000,000=4,294,960,2962,000,000≈2,147.480148 sect=\frac{4,294,967,296-7,000}{2,000,000} =\frac{4,294,960,296}{2,000,000} \approx 2,147.480148\ \text{sec}

Convert to hours:

2,147.48 sec÷3600≈0.5965 hours2,147.48\ \text{sec}\div 3600 \approx 0.5965\ \text{hours}

Answer:
[ \boxed{t \approx 2.15\times 10^3\ \text{seconds} \approx 35.8\ \text{minutes}} ] (Using 11 Mbyte =106=10^6 bytes.)

Note on units: If your course instead uses 11 MiB =220=2^{20} bytes, the time will be slightly larger. The modulo logic 232−70002^{32}-7000 is the core part 2.

Footnotes

  1. RFC 793 — Transmission Control Protocol - Defines the TCP sequence number field and sequence space behavior. ↩

  2. RFC 793 — Sequence Numbers (32-bit) and wraparound behavior - Specifies the 32-bit nature and modulo arithmetic for sequence handling. ↩

Key idea: wrap is based on bytes, not segments

TCP sequence numbers count the byte positions in the TCP byte stream, so wrap time depends on the number of octets sent (data bytes plus any SYN/FIN semantics per the TCP state), and here we assume pure data bytes at a constant rate .

Footnotes

  1. RFC 793 — Transmission Control Protocol - Defines the TCP sequence number field and sequence space behavior. ↩

Be careful about how Mbytes/sec is defined

Some problems assume 11 Mbyte =106=10^6 bytes (decimal). Others use 11 MiB =220=2^{20} bytes. The final numeric time changes, but the method and the modulo 2322^{32} wrap remain the same 2.

Footnotes

  1. RFC 793 — Transmission Control Protocol - Defines the TCP sequence number field and sequence space behavior. ↩

  2. RFC 793 — Sequence Numbers (32-bit) and wraparound behavior - Specifies the 32-bit nature and modulo arithmetic for sequence handling. ↩

TCP sequence number lifecycle (wrap intuition)

Start

t = 0

Sequence number begins at 7000."

Transmit bytes

t increases

Sequence number advances with the byte stream."

Wraparound

after $2^{32}-7000$ bytes

Sequence number modulo 2322^{32} returns to 0."

Wrap timing breakdown (decimal Mbyte assumption)

Illustrative values used in the calculation

Common pitfalls & extensions

Knowledge Check

Question 1 of 3
Q1Single choice

TCP sequence numbers wrap because the sequence number field is: