TCP option 3, Window Scale
2016-07-12 15:37
573 查看
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
14:50:03.533074 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 0
14:50:03.534587 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [P.], seq 1:1025, ack 1,
win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 1024
14:50:03.534605 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], seq 1025:6817, ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 5792
14:50:03.534634 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [.], ack 1025,
win 249, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.534663 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [.], ack 6817,
win 313, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.534833 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [FP.], seq 6817:8193, ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 1376
14:50:03.534868 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [F.], seq 1, ack 8194, win 330, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.538882 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], ack 2, win 457, options [nop,nop,TS val 2222154 ecr 5210055], length 0
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
14:50:03.533074 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 0
14:50:03.534587 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [P.], seq 1:1025, ack 1,
win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 1024
14:50:03.534605 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], seq 1025:6817, ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 5792
14:50:03.534634 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [.], ack 1025,
win 249, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.534663 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [.], ack 6817,
win 313, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.534833 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [FP.], seq 6817:8193, ack 1, win 457, options [nop,nop,TS val 2222148 ecr 5210054], length 1376
14:50:03.534868 IP 192.168.1.105.7777 > 192.168.1.111.48102: Flags [F.], seq 1, ack 8194, win 330, options [nop,nop,TS val 5210055 ecr 2222148], length 0
14:50:03.538882 IP 192.168.1.111.48102 > 192.168.1.105.7777: Flags [.], ack 2, win 457, options [nop,nop,TS val 2222154 ecr 5210055], length 0
相关文章推荐
- TCP版backshell的VBS脚本代码
- 使用C语言编写基于TCP协议的Socket通讯程序实例分享
- TCP Wrappers防火墙介绍与封锁IP地址的方法
- c语言多进程tcp服务器示例
- win2003连接限制TCP连接限制
- PowerShell脚本开发之收发TCP消息包
- Nodejs创建TCP服务器 - king0222
- C#实现TCP连接信息统计的方法
- linux shell 脚本实现tcp/upd协议通讯(重定向应用)
- 使用C#实现基于TCP和UDP协议的网络通信程序的基本示例
- Android使用socket创建简单TCP连接的方法
- Android实现TCP客户端接收数据的方法
- Android TCP 文件客户端与服务器DEMO介绍
- Android中实现TCP和UDP传输实例
- python实现可将字符转换成大写的tcp服务器实例
- php实现TCP端口检测的方法
- Java Socket编程实例(一)- TCP基本使用
- Java Socket编程实例(三)- TCP服务端线程池
- Java实现Socket的TCP传输实例
- 实现了基于TCP的Java Socket编程实例代码