World Library  
Flag as Inappropriate
Email this Article

TCP window scale option

Article Id: WHEBN0005747525
Reproduction Date:

Title: TCP window scale option  
Author: World Heritage Encyclopedia
Language: English
Subject: Bandwidth-delay product, Transmission Control Protocol, Round-trip delay time, Technical features new to Windows Vista, Infineta Systems
Collection: Network Acceleration, Transmission Control Protocol
Publisher: World Heritage Encyclopedia

TCP window scale option

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in IETF RFC 1323 which deals with long fat networks.


  • TCP windows 1
  • Theory 2
  • Possible side effects 3
  • Configuration of operating systems 4
    • Windows 4.1
    • Linux 4.2
    • FreeBSD, OpenBSD, NetBSD and Mac OS X 4.3
  • Sources 5

TCP windows

The throughput of a communication is limited by two windows: the congestion window and the receive window. The congestion window tries not to exceed the capacity of the network (congestion control); the receive window tries not to exceed the capacity of the receiver to process data (flow control). The receiver may be overwhelmed by data if for example it is very busy (such as a Web server). Each TCP segment contains the current value of the receive window. If, for example, a sender receives an ack which acknowledges byte 4000 and specifies a receive window of 10000 (bytes), the sender will not send packets after byte 14000, even if the congestion window allows it.


The TCP window scale option is needed for efficient transfer of data when the bandwidth-delay product is greater than 64K. For instance, if a T1 transmission line of 1.5Mbits/second was used over a satellite link with a 513 millisecond round trip time (RTT), the bandwidth-delay product is (1,572,864 * 0.513) = 806,879 bits or about 100,860 bytes. Using a maximum buffer size of 64K only allows the buffer to be filled to (65,535 / 100,860) = 65% of the theoretical maximum speed of 1.5Mbits/second, or 1.02 Mbit/s.

By using the window scale option, the receive window size may be increased up to a maximum value of 1,073,725,440 bytes. This is done by specifying a one byte shift count in the header options field. The true receive window size is left shifted by the value in shift count. A maximum value of 14 may be used for the shift count value. This would allow a single TCP connection to transfer data over the example satellite link at 1.5Mbit/second utilizing all of the available bandwidth.

Possible side effects

Because some routers and firewalls do not properly implement TCP Window Scaling, it can cause a user's Internet connection to malfunction intermittently for a few minutes, then appear to start working again for no reason. There is also an issue if a firewall doesn't support the TCP extensions. [1]

Configuration of operating systems


TCP Window Scaling is implemented in Windows since Windows 2000.[2][3] It is enabled by default in Windows Vista / Server 2008 and newer, but can be turned off manually if required.[4] Windows Vista and Windows 7 have a fixed default TCP receive buffer of 64 kb, scaling up to 16 MB through "autotuning", limiting manual TCP tuning over long fat networks.[5]


Linux kernels (from 2.6.8, August 2004) have enabled TCP Window Scaling by default. The configuration parameters are found in the /proc filesystem, see pseudo-file /proc/sys/net/ipv4/tcp_window_scaling and its companions /proc/sys/net/ipv4/tcp_rmem and /proc/sys/net/ipv4/tcp_wmem (more information: man tcp, section sysctl).[6]

Scaling can be turned off by issuing the command sysctl -w "net.ipv4.tcp_window_scaling=0" as root. To maintain the changes after a restart, include the line "net.ipv4.tcp_window_scaling=0" in /etc/sysctl.conf (or /etc/sysctl.d/99-sysctl.conf as of systemd 207).

FreeBSD, OpenBSD, NetBSD and Mac OS X

The default setting for FreeBSD, OpenBSD, NetBSD and Mac OS X is to have window scaling (and other features related to RFC 1323) enabled.
To verify their status, a user can check the value of the "net.inet.tcp.rfc1323" variable via the sysctl command:

sysctl net.inet.tcp.rfc1323

A value of 1 (output "net.inet.tcp.rfc1323=1") means scaling is enabled, 0 means "disabled". If enabled it can be turned off by issuing the command:

sudo sysctl -w net.inet.tcp.rfc1323=0

This setting is lost across a system restart. To ensure that it is set at boot time, add the following line to /etc/sysctl.conf:



  1. ^ Network connectivity may fail when you try to use Windows Vista behind a firewall device
  2. ^ Description of Windows 2000 and Windows Server 2003 TCP Features
  3. ^ TCP Receive Window Size and Window Scaling
  4. ^ "Network connectivity fails when you try to use Windows Vista behind a firewall device".  
  5. ^ [[1]
  6. ^ "/proc/sys/net/ipv4/* Variables:". 
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.