Use it when a transfer is slow with no loss, especially over a long-distance link, or when a capture shows zero-window or window-full events.
TCP Window Scaling & Flow Control
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.
1. Do both SYN and SYN-ACK carry a window scale — at both ends of the path?
2. Missing after crossing a device → it strips the option.
3. Zero-window packets → which side sends them? Look at that application.
4. Window large and still slow → the limit is loss or the sender, not the window.
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
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
tcpdump -ni eth0 'tcp[tcpflags] & tcp-syn != 0' and host 192.0.2.10Verification & 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 Verify boundary
tcpdump -ni eth0 'tcp[tcpflags] & tcp-syn != 0' and host 192.0.2.10
ss -ti dst 192.0.2.10
sysctl net.ipv4.tcp_window_scaling net.ipv4.tcp_rmem
The first shows the wscale value in SYN and SYN-ACK. ss -ti on Linux shows, for a live connection, the scale in each direction (wscale:7,7), the receive window, and counters such as rwnd_limited, the share of time the sender was held back by the receiver's window. The sysctl line shows whether scaling is enabled and how large receive buffers may grow.
In Wireshark: tcp.analysis.zero_window, tcp.analysis.window_update and tcp.analysis.window_full mark the events; the "calculated window size" column shows the true value when the handshake is in the capture.
Known-good: both handshake packets carry a window scale, and during the transfer the window stays well above zero.
Step 2 Failure isolation workflow Narrow the fault
- A transfer over a long-distance link is slow, with no loss. Window scaling is not in effect — check both handshake packets, at both ends of the path — or the receive buffer is small.
- The SYN leaves with a window scale and arrives without it. A firewall or other device strips or zeroes the option.
- Zero-window segments from the receiver. Its application is slow to read: a busy server, a slow disk, a client that cannot process fast enough.
- "Window full" marked on the sender's segments. The sender is using the whole window; the receiver is the limit.
- The window values look tiny throughout. The capture lacks the handshake; the values are unscaled.
- A transfer runs fast at first, then drops to a crawl with small windows. The receiver's buffer filled; look at the receiving application.
- Throughput is limited and the window is large. The limit is elsewhere: the sender's congestion window, loss on the path, or the application producing data slowly.
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.
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.
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.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
Every TCP segment tells the other side how much more data the sender of that segment is prepared to receive: its receive window. The other side may not have more than that outstanding. Window scaling is the option that lets this value exceed the 65,535 bytes the header field can express.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
The window sets an upper limit on throughput that has nothing to do with the capacity of the link. A window that is too small — because scaling was not agreed, or because the receiving application is slow — produces a transfer that is slow with no loss and no congestion. It is the classic case of a "network problem" that is not one.
ReferenceHow it works1 section · depth on demand
How it works
The receive window is the free space in the receiver's buffer. The sender may have at most that many bytes sent and not yet acknowledged. As the application reads data, space frees up and the window grows; if the application reads slower than data arrives, the window shrinks.
Why scaling is needed. The window field is 16 bits: at most 65,535 bytes. A sender that must wait for acknowledgments after every 64 KB cannot go faster than about 64 KB per round trip:
| Round-trip time | Maximum throughput with a 64 KB window |
|---|---|
| 1 ms (same site) | About 500 Mb/s |
| 20 ms | About 26 Mb/s |
| 100 ms (intercontinental) | About 5 Mb/s |
Window scale. In the SYN and SYN-ACK, each side sends a shift value from 0 to 14. From then on the value in the window field is multiplied by 2 to that power: with a shift of 7, a field value of 500 means 64,000 bytes. The shift applies only if both handshake packets carried the option, is fixed for the connection, and is never sent again.
Zero window. When the buffer is full, the receiver advertises a window of 0. The sender stops, and probes at intervals to learn when space is available. The receiver announces it with a window update. A zero window is the receiver saying "my application is not keeping up" — an endpoint matter, not a network one.
Two different limits. The receive window protects the receiver. The sender additionally keeps its own limit, the congestion window, to protect the network; it is not visible in packets. The amount in flight is bounded by the smaller of the two.
In captures. Without the handshake, an analyser cannot know the scale and shows the raw field value — which looks alarmingly small. Wireshark marks this as an unknown scaling factor.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Window scaling and long fat networks
The TCP window field is 16 bits, so without scaling a receiver can never advertise more than 65,535 bytes. RFC 7323's window scale option fixes this. Each side sends a shift count in its SYN, and the advertised window is multiplied by 2 to that power. The shift is at most 14, which gives a maximum window of 1 GiB. Scaling is used only if both SYNs carry the option. If either side leaves it out, neither direction is scaled.
Throughput limit without scaling
| RTT | Maximum throughput with a 64 KB window |
|---|---|
| 1 ms (LAN) | about 520 Mbit/s |
| 10 ms (regional) | about 52 Mbit/s |
| 40 ms (continental) | about 13 Mbit/s |
| 150 ms (intercontinental) | about 3.5 Mbit/s |
Interpreting scaled windows
| Value in the header | Shift | Real window |
|---|---|---|
| 502 | 7 (×128) | 64,256 bytes |
| 2,048 | 9 (×512) | 1,048,576 bytes |
| 65,535 | 0 (no scaling) | 65,535 bytes |
A capture that misses the handshake can't know the shift, so tools then show the raw value. Wireshark marks such windows as "unknown scaling".
host$ sudo tcpdump -ni eth0 -c 2 'tcp[tcpflags] & tcp-syn != 0 and host 10.30.0.15' | grep -o "wscale [0-9]*"
wscale 7
wscale 9
host$ ss -ti dst 10.30.0.15 | grep -o "wscale:[^ ]*\|rcv_space:[^ ]*\|snd_wnd:[^ ]*"
host$ sysctl net.ipv4.tcp_rmem net.core.rmem_max
net.ipv4.tcp_rmem = 4096 131072 6291456
host$ iperf3 -c 10.30.0.15 -t 10 -w 4M
When large windows don't help
| Limit | Check |
|---|---|
Receive buffer limits (tcp_rmem, application socket buffers) | rcv_space in ss -i |
| Congestion window kept small by loss | Retransmissions in ss -i |
| A middlebox strips window scaling | Missing wscale in one of the SYNs |
| The application reads slowly | Zero-window events |
The window needed is the bandwidth-delay product: link rate × RTT. For 1 Gbit/s at 40 ms, that is about 5 MB.
Documented example, not captured output.
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 Network & Protocols → TCP Window Scaling & Flow Control. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
TCP Window / Zero Window
Receiver flow-control evidence.
1. Check Window Scale in handshake.
2. Track advertised receive window.
3. Find Zero Window/Window Full.
4. Identify which endpoint advertises it.
5. Correlate application receive backlog and socket buffers.