TCP Receive Window Update: Computing the Window Before and After an ACK
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 bytes, the receive window covers 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:
- Previous advertised window: bytes
- New ACK:
- New advertised window: bytes
Draw the window before and after using byte ranges
- 1Step 1
Left edge = previous ACK = . Right edge = .
- 2Step 2
Previous window spans sequence numbers (inclusive).
- 3Step 3
Left edge = new ACK = . Right edge = .
- 4Step 4
New window spans sequence numbers (inclusive).
- 5Step 5
The new window overlaps the old window from to ; it advances the left edge by bytes and extends the right edge by bytes.
Window diagrams (byte sequence number space)
Before (ACK=22001, window=10000)
- Left edge =
- Right edge =
A more explicit number-line style:
After (ACK=24001, window=12000)
- Left edge =
- Right edge =
Receive window edges: before vs after (inclusive byte ranges)
Left edge = ACK; right edge = ACK + window - 1.
What changed?
- ACK advanced from to → the receiver has cumulatively received more bytes.
- Advertised window increased from to :
- Old right edge:
- New right edge:
- Extension: 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 using the advertised receive window in bytes.
Byte-accuracy matters
ACK in TCP is for the next expected byte (cumulative). Always use 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 processedCovers bytes (ACK=22001, W=10000)."
New ACK arrives in the update
Receiver advances cumulative ACKLeft edge moves to 24001 because bytes up to 24000 are now acknowledged."
New advertised window
Updated flow controlRight edge becomes 36000 since W increases to 12000."
Knowledge Check
Given ACK=22001 and advertised window W=10000 bytes, what is the inclusive right edge of the receive window?