TCP window scale option

From Wikipedia, the free encyclopedia

Jump to: navigation, search

The TCP window scale option is an option to increase the TCP congestion window size above its maximum value of 65,536 bytes. Ths TCP option, along with several others, is defined in IETF RFC 1323 which deals with Long-Fat networks, or LFN.

Contents

[edit] Why is this option needed?

This 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 (1500000*.513) = 769,500 bits or 96188 bytes. Using a maximum buffer size of 64K only allows the buffer to be filled to 68% of the theoretical maximum speed of 1.5Mbits/second, or 1.02Mbits/sec.

By using the window scale option, files can be transferred at nearly 1.5Mbit/second utilizing nearly all of the available bandwidth.

This option is also useful when sending large files greater than 64KB over slow networks.

By using the window scale option, the congestion window size may be increased up to a maximum value of 1 gibibyte (1,073,741,824 bytes). This is done by specifying a one byte shift count in the header options field. The true congestion window size is left shifted by the value in shift count. A maximum value of 14 may be used for the shift count value.

[edit] Compatibility problems

[edit] Theoretical Problems

There is a potential problem when large window scaling options are enabled, and the application uses a small buffer. For instance, if the window scale option is 14, the smallest advertised buffer is 1*2^14, or 16384 bytes. If the application only allocates 8K, then it can never notify the sender it has available memory.

To prevent this from happening, the OS should adjust the window scale factor to correspond to the amount of memory allocated in the buffer. If the buffer is 1GB, then set window scale to 14. If 512MB, set it to 13, etc, If the buffer is less than 64K, then the OS should not use the window scale option.

[edit] Windows

TCP Window Scaling is implemented in Windows 2000, XP, Server 2003 and Vista operating systems. Vista has enabled it by default, while the other operating systems implement it as an option. [1][2]Because many 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. If "diagnose problem" is selected in Vista, an error message will be displayed "cannot communicate with primary DNS server." [3]

There is also an issue if a firewall doesn't support the TCP extensions. [4]

[edit] Linux

Linux kernels (from 2.6.8) have enabled TCP Window Scaling by default, which may raise potential problems in this area.


Symptom under Ubuntu 7.10 :

   1 - All websites responds to ping
   2 - Firefox won't display almost any web page.

Resolution :

   1 - Add theses lines at the end of the '/etc/sysctl.conf' file :
       net.ipv4.tcp_window_scaling=0
       net.ipv4.tcp_rmem=4096 16384 524288
       net.ipv4.tcp_wmem=4096 16384 524288
   2 - Save the file and reboot.

[edit] Sources

  1. ^ http://support.microsoft.com/kb/224829
  2. ^ http://msdn2.microsoft.com/en-us/library/ms819736.aspx
  3. ^ http://www.tech-recipes.com/rx/1744/vista_tcp_cannot_communicate_primary_dns_server
  4. ^ http://support.microsoft.com/kb/934430
Personal tools
Languages