|TCP option 3, Window Scale|
|Protocol type:||Transport layer protocol.|
|Option length:||3 bytes.|
|Links:||IANA: TCP option numbers.|
RFC 1323, pg 8:
The window scale extension expands the definition of the TCP window to 32 bits and then uses a scale factor to carry this 32 bit value in the 16 bit Window field of the TCP header (SEG.WND in RFC-793). The scale factor is carried in a new TCP option, Window Scale. This option is sent only in a SYN segment (a segment with the SYN bit on), hence the window scale is fixed in each direction when a connection is opened. (Another design choice would be to specify the window scale in every TCP segment. It would be incorrect to send a window scale option only when the scale factor changed, since a TCP option in an acknowledgement segment will not be delivered reliably (unless the ACK happens to be piggy-backed on data in the other direction). Fixing the scale when the connection is opened has the advantage of lower overhead but the disadvantage that the scale factor cannot be changed during the connection.
RFC 1323, pg 9:
The three-byte Window Scale option may be sent in a SYN segment by a TCP. It has two purposes: (1) indicate that the TCP is prepared to do both send and receive window scaling, and (2) communicate a scale factor to be applied to its receive window. Thus, a TCP that is prepared to scale windows should send the option, even if its own scale factor is 1. The scale factor is limited to a power of two and encoded logarithmically, so it may be implemented by binary shift operations.
|MAC header||IP header||TCP header||TCP option 3||Data|
TCP Option 3:
Kind. 8 bits. Set to 3.
Length. 8 bits. Set to 3.
This value is used as a multiplier to the window value. This value may be cleared to zero as an offer to scale, while applying a scale factor of 1 to the receive window.
[RFC 1323] TCP Extensions for High Performance.
[RFC 1072] TCP Extensions for Long-Delay Paths.