Use this Topic when a TCP stream establishes but throughput collapses, zero-window events appear, the sender pauses despite a healthy path, or receive buffering and application consumption may be the bottleneck.
Flow control
TCP receive-window flow control is receiver-driven. The ACK window field advertises available receive space; window scaling negotiated in the SYN exchange extends the usable window beyond the original 16-bit field.
1. Capture the stream; check window scale in the SYN and SYN-ACK.
2. Wireshark tcp.analysis.zero_window or tcp.window_size small → receiver limited.
3. ss -tni — rcv_space, snd_wnd, cwnd.
4. Window full but no loss → receiver application slow or buffer too small.
5. Window scaling stripped by a middlebox → windows stuck at 64 KB.
window scale negotiated in SYN → receiver advertises free buffer in every ACK → sender keeps in flight ≤ window → receiver reads data and reopens the window
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification and known-good state Verify boundary
For verification, first show the scale factor negotiated in both SYN directions, because later raw window values are otherwise easy to misread. Track the receiver’s advertised window over time together with ACK progression and payload delivery. A known-good transfer should show a window large enough for the path/RTT product or at least frequent updates that prevent sustained sender stalls. If the window repeatedly collapses, correlate timestamps with host memory/socket telemetry and application read behavior. On a transit network, also confirm there is no loss, shaping or reordering that would independently throttle the sender. Use throughput and RTT as consequences, not as substitutes for the actual window signal. This section is authored reference guidance for Flow control in the TCP context.
Step 2 Verification & troubleshooting Narrow the fault
1. Verify IP path and return path.
2. Confirm destination port is listening.
3. Inspect the three-way handshake.
5. Validate application request/response.
Step 3 Failure signatures and troubleshooting branches Narrow the fault
If the connection establishes but periodically stalls, identify whether the stall begins with a shrinking advertised window, packet loss, delayed ACK progression or an application pause. Zero-window advertisements followed by probes and later window updates are strong evidence of receiver-side backpressure, but they still do not identify whether the cause is the application, socket limits, CPU pressure or another host resource. If the window remains large while retransmissions increase, troubleshoot path loss or sender congestion behavior instead. If a capture only sees one direction, do not infer receive-window state from sender timing alone. Avoid changing MTU, QoS or routing when the first contradictory signal is clearly receiver capacity. This section is authored reference guidance for Flow control in the TCP context.
Step 4 When the problem is really fixed Narrow the fault
After remediation, replay the same transfer and confirm the receiver window no longer collapses in the previous failure interval, ACK progression remains continuous and application throughput returns without introducing retransmission or latency regressions. If host buffer tuning was changed, confirm the application actually drains data and that memory pressure did not move elsewhere. If a network change was made, show rwnd behavior was not merely coincident with reduced loss. The closure record should distinguish captured window observations from authored interpretation, and it should not set human-review, Evidence or verification timestamps unless those states were actually performed. This section is authored reference guidance for Flow control in the TCP context.
Step 5 Common mistakes Narrow the fault
- Small receive windows on long-delay links.
- Window scaling stripped by middleboxes.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Do not confuse receive-window limits with congestion control. rwnd reflects receiver capacity; cwnd is sender congestion state. Effective flight size is bounded by both, and packet loss can reduce throughput even when the advertised window is large.
- Packet capture:
tcpdump -nn -i <if> host <ip> and port <p>or Wireshark filtertcp.stream eq <n>. ss -tni(Linux) /netstat -ano(Windows) — connection state, RTT, retransmits and windows.Test-NetConnection <host> -Port <p>/nc -vz <host> <p>— does the handshake complete?show tcp brief(IOS) — TCP sessions to the device itself.show interfaces <if> | include drops|errors— drops on the path.
ReferenceImportant terms & boundaries4 sections · depth on demand
Key operational limits
- SYN, SYN-ACK, ACK establish a connection
- Sequence and acknowledgement numbers track bytes
In depth
Flow control and the receive window
Flow control stops a fast sender from overrunning a slow receiver. In RFC 9293, each ACK carries a window value. This is the number of bytes beyond the acknowledged point the receiver is willing to accept, so the acceptable range runs from RCV.NXT to RCV.NXT + RCV.WND − 1. The RFC requires the window to be treated as an unsigned number and recommends 32-bit window arithmetic. When the window reaches zero, only ACKs are acceptable, but RST and URG must still be processed.
Flow control versus congestion control
| Flow control | Congestion control | |
|---|---|---|
| Protects | The receiver | The network |
| Signal | The advertised receive window | Loss, delay, ECN |
| Limit on the sender | Receive window | Congestion window |
| Effective sending limit | The smaller of the two |
Window scaling and throughput
The window field is 16 bits, so without the window scale option the window is at most 65,535 bytes. Maximum throughput is roughly the window divided by the round-trip time. With a 64 KB window over a 40 ms path, that is about 13 Mbit/s whatever the link speed. Window scaling, negotiated in the SYN, allows windows of many megabytes.
| Bandwidth × RTT (bandwidth-delay product) | Window needed |
|---|---|
| 100 Mbit/s × 40 ms | about 500 KB |
| 1 Gbit/s × 40 ms | about 5 MB |
| 10 Gbit/s × 10 ms | about 12.5 MB |
host$ tshark -r capture.pcap -Y "tcp.analysis.zero_window || tcp.analysis.window_full" -T fields -e frame.number -e ip.src -e tcp.window_size
5120 10.30.0.15 0
5121 10.110.0.64 0
host$ sysctl net.ipv4.tcp_rmem net.ipv4.tcp_window_scaling
net.ipv4.tcp_rmem = 4096 131072 6291456
net.ipv4.tcp_window_scaling = 1
Reading window problems
| Sign | Meaning |
|---|---|
| Zero window from the receiver | The receiving application isn't reading fast enough |
| Window full at the sender | The sender is limited by the advertised window |
| A small, constant window | Window scaling is disabled or stripped |
| Throughput far below link speed on long paths | The window is smaller than the bandwidth-delay product |
A zero window is a receiver problem, not a network problem, and it shows up clearly in captures.
Documented example, not captured output.
Quick reference
TCP flow control stops a fast sender from overwhelming a slow receiver. The receiver advertises a receive window — how many bytes it can accept — in every segment, and the sender never has more unacknowledged data outstanding than that window.
| Concept | Meaning |
|---|---|
| Receive window | Free buffer space at the receiver |
| Window scaling | Multiplier allowing windows above 64 KB |
| Zero window | Receiver buffer full — sender pauses |
| Window probe | Sender checks whether the window reopened |
Throughput is limited to roughly window ÷ round-trip time, so long-distance links need large windows; zero-window events in captures point to a slow receiving application.
Mechanics and state ownership
TCP flow control is a closed-loop receiver signal. As payload arrives, the receiving stack places bytes in a socket receive buffer and acknowledges contiguous data while advertising remaining capacity. If the application consumes data quickly, the window stays open; if the application or host cannot drain the buffer, the advertised window shrinks and can reach zero. The sender must respect the advertised window and may pause even though the network is uncongested. Window scaling is negotiated during the handshake and changes how the 16-bit window field is interpreted for the lifetime of the connection. Flow control therefore answers “can the receiver accept more bytes?” and must be kept separate from congestion control, which answers “how much data should the sender inject into the path?” Mechanics must be interpreted together with the exact protocol state and interface or routing context in which they were learned. This section is authored reference guidance for Flow control in the TCP context.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Fundamentals → TCP → Flow control. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%Quick lookup tables
Flow control operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Signal | Known-good interpretation | Failure signature | Next boundary |
|---|---|---|---|
| Advertised window | Sufficient or regularly refreshed | Sustained tiny/zero window | Receiver socket/app |
| Window scale | Negotiated as expected in SYN | Missing/unexpected scale changes interpretation | Handshake/options |
| ACK progress | Continues while data arrives | ACK stalls with open window | Loss/path/endpoint |
| Zero-window probe | Rare recovery mechanism | Repeated probes over long interval | Receiver pressure |
| Throughput | Matches path and endpoint capacity | Low despite healthy rwnd | Congestion/loss/application |