Flow control
Cheat sheet · https://pcornel.dk/topic.php?topic=915
Answer
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.
Remember
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.
First checks
- 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.
Verify in this order
window scale negotiated in SYN → receiver advertises free buffer in every ACK → sender keeps in flight ≤ window → receiver reads data and reopens the window
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Flow control operational reference
| 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 |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=915