RFC介绍点击打开链接
TCP协议中Window Scale Option问题【完全解决】
http://bbs.chinaunix.net/thread-1940498-1-1.html
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.
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.
绿色标明报文中, 窗口大小为接收方313,显然与实际情况不符,是因为三路握手中,标明了Window Scale TCP选项,且其值为7即2^7 = 128;
(所以实际窗口大小)313*2^7 = 40064;貌似超出了win 28960这个值,求解中!!!
14:50:03.530566 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [S], seq 2885751939, win 14600, options [mss 1460,sackOK,TS val 2222145 ecr 0,nop,wscale 5], length 0
14:50:03.530577 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [S.], seq 2652981528, ack 2885751940, win 28960, options [mss 1460,sackOK,TS val 5210054 ecr 2222145,nop, wscale 7], length 0