TCP Window Scaling & Flow Control
Cheat sheet · https://pcornel.dk/topic.php?topic=312
Answer
Every TCP segment states how much more data its sender can receive — the receive window. Window scaling multiplies the 16-bit field so the window can exceed 65,535 bytes.
Remember
Throughput cannot exceed window ÷ round-trip time: with 64 KB and 100 ms that is about 5 Mb/s. Scaling works only if both handshake packets carry the option. A zero window means the receiving application is not reading — an endpoint matter, not a network fault.
First checks
tcpdump -ni <if> 'tcp[tcpflags] & tcp-syn != 0' and host <ip>— thewscalevalue in SYN and SYN-ACK.ss -ti dst <ip>—wscale, receive window, andrwnd_limited.sysctl net.ipv4.tcp_window_scaling net.ipv4.tcp_rmem— host settings.- Wireshark:
tcp.analysis.zero_window,tcp.analysis.window_full.
Commands
ss -iss -ti
Verify in this order
window scale in SYN and SYN-ACK, unchanged in transit → receive buffer large enough → application reads promptly → advertised window stays open → sender limited by the network, not by the receiver
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=312