TCP Receive Window Update: Computing the Window Before and After an ACK

TCP Receive Window Update: Computing the Window Before and After an ACK

Verified Sources
Nov 4, 2026

In TCP, the receiver’s advertised window limits which byte sequence numbers the sender may transmit next without overrunning the receiver’s buffer. The receiver communicates this via a cumulative acknowledgment (ACK) plus a window advertisement (often called the receive window).

The key idea is:

  • The left edge of the receive window is the ACK number (the next byte the receiver expects).
  • If the advertised window is WW bytes, the receive window covers WW bytes starting at the ACK, i.e., from ACK to ACK + W − 1 (inclusive).

We will apply this to compute the window “before” and “after” the given update.

Given

  • Previous ACK: 2200122001
  • Previous advertised window: 1000010000 bytes
  • New ACK: 2400124001
  • New advertised window: 1200012000 bytes

Draw the window before and after using byte ranges

  1. 1
    Step 1

    Left edge = previous ACK = 2200122001. Right edge = 22001+10000−1=3200022001 + 10000 - 1 = 32000.

  2. 2
    Step 2

    Previous window spans sequence numbers [22001,32000][22001, 32000] (inclusive).

  3. 3
    Step 3

    Left edge = new ACK = 2400124001. Right edge = 24001+12000−1=3600024001 + 12000 - 1 = 36000.

  4. 4
    Step 4

    New window spans sequence numbers [24001,36000][24001, 36000] (inclusive).

  5. 5
    Step 5

    The new window overlaps the old window from 2400124001 to 3200032000; it advances the left edge by 20002000 bytes and extends the right edge by 40004000 bytes.

Window diagrams (byte sequence number space)

Before (ACK=22001, window=10000)

  • Left edge = 2200122001
  • Right edge = 22001+10000−1=3200022001 + 10000 - 1 = 32000

A more explicit number-line style:

After (ACK=24001, window=12000)

  • Left edge = 2400124001
  • Right edge = 24001+12000−1=3600024001 + 12000 - 1 = 36000

Receive window edges: before vs after (inclusive byte ranges)

Left edge = ACK; right edge = ACK + window - 1.

What changed?

  • ACK advanced from 2200122001 to 2400124001 → the receiver has cumulatively received 24001−22001=200024001 - 22001 = 2000 more bytes.
  • Advertised window increased from 1000010000 to 1200012000:
    • Old right edge: 3200032000
    • New right edge: 3600036000
    • Extension: 36000−32000=400036000 - 32000 = 4000 more bytes buffered beyond the old right edge.

sliding window behavior is reflected by the left edge moving with cumulative ACK and the right edge moving with the window advertisement.

Quick rule for exams

Compute ranges as [ACK, ACK+W−1][ACK,\ ACK+W-1] using the advertised receive window WW in bytes.

Byte-accuracy matters

ACK in TCP is for the next expected byte (cumulative). Always use ACK+W−1ACK + W - 1 for the inclusive right edge—forgetting “−1” shifts your diagram by one byte.

Common interpretation checks

TCP window evolution around an ACK update

Old receive window

Before segment processed

Covers bytes 22001..3200022001..32000 (ACK=22001, W=10000)."

New ACK arrives in the update

Receiver advances cumulative ACK

Left edge moves to 24001 because bytes up to 24000 are now acknowledged."

New advertised window

Updated flow control

Right edge becomes 36000 since W increases to 12000."

Knowledge Check

Question 1 of 4
Q1Single choice

Given ACK=22001 and advertised window W=10000 bytes, what is the inclusive right edge of the receive window?