当前位置: 技术问答>linux和unix
急,关于TCP滑动窗口!能解决,可RMB酬谢!
来源: 互联网 发布时间:2016-06-21
本文导语: 写了一个TCP服务器(在电信机房,121.11.144.174:8810) 正常情况下通信: 03:38:37.389924 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 13101 win 17424 03:38:37.389930 IP 121.11.144.174.8810 > 43.56.82.218.broad.x...
写了一个TCP服务器(在电信机房,121.11.144.174:8810)
正常情况下通信:
03:38:37.389924 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 13101 win 17424
03:38:37.389930 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 18909:20361(1452) ack 84 win 5840
03:38:37.389932 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 20361:21813(1452) ack 84 win 5840
03:38:37.389935 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 21813:23265(1452) ack 84 win 5840
03:38:37.394795 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 16005 win 17424
03:38:37.394803 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 23265:24717(1452) ack 84 win 5840
03:38:37.394805 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 24717:26169(1452) ack 84 win 5840
03:38:37.394808 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 26169:27621(1452) ack 84 win 5840
03:38:37.399280 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 18909 win 17424
03:38:37.399287 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 27621:29073(1452) ack 84 win 5840
03:38:37.399289 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 29073:30525(1452) ack 84 win 5840
03:38:37.399291 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 30525:31977(1452) ack 84 win 5840
03:38:37.439391 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 21813 win 17424
03:38:37.439397 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: P 31977:33429(1452) ack 84 win 5840
03:38:37.439400 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 33429:34881(1452) ack 84 win 5840
03:38:37.439402 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 34881:36333(1452) ack 84 win 5840
03:38:37.449379 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 24717 win 17424
03:38:37.449385 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 36333:37785(1452) ack 84 win 5840
看以上记录,滑动窗口都正常的,速度接收正常.
但发现有少部分客户机,譬如是网通连接电信的,出现如下情况:
20:22:10.529286 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 7293 win 640
20:22:10.944991 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 7293:7933(640) ack 84 win 5840
20:22:11.186660 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 7933 win 640
20:22:11.603928 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 7933:8573(640) ack 84 win 5840
20:22:11.842146 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 8573 win 640
20:22:11.842158 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 8573:8745(172) ack 84 win 5840
20:22:12.061018 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 8745 win 640
20:22:12.480856 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 8745:9385(640) ack 84 win 5840
20:22:12.717633 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 9385 win 640
20:22:13.138786 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 9385:10025(640) ack 84 win 5840
20:22:13.373375 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10025 win 640
20:22:13.373383 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10025:10197(172) ack 84 win 5840
20:22:13.592373 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10197 win 640
20:22:14.014708 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10197:10837(640) ack 84 win 5840
20:22:14.248240 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10837 win 640
20:22:14.671643 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10837:11477(640) ack 84 win 5840
20:22:14.905233 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 11477 win 640
20:22:14.905241 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 11477:11649(172) ack 84 win 5840
20:22:15.124355 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 11649 win 640
20:22:15.548561 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 11649:12289(640) ack 84 win 5840
20:22:15.779845 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 12289 win 640
20:22:16.206498 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 12289:12929(640) ack 84 win 5840
20:22:16.436849 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 12929 win 640
20:22:16.436859 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 12929:13101(172) ack 84 win 5840
20:22:16.654347 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 13101 win 640
20:22:17.080418 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 13101:13741(640) ack 84 win 5840
20:22:17.311578 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 13741 win 640
请观察时间和滑动窗口,发现速度很慢,滑动窗口也很小.
请问有没人知道是什么造成这样的,客户机和服务器之间速度不应该这样慢的,我直接通过web连接下载文件测试,发现很快的.
正常情况下通信:
03:38:37.389924 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 13101 win 17424
03:38:37.389930 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 18909:20361(1452) ack 84 win 5840
03:38:37.389932 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 20361:21813(1452) ack 84 win 5840
03:38:37.389935 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 21813:23265(1452) ack 84 win 5840
03:38:37.394795 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 16005 win 17424
03:38:37.394803 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 23265:24717(1452) ack 84 win 5840
03:38:37.394805 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 24717:26169(1452) ack 84 win 5840
03:38:37.394808 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 26169:27621(1452) ack 84 win 5840
03:38:37.399280 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 18909 win 17424
03:38:37.399287 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 27621:29073(1452) ack 84 win 5840
03:38:37.399289 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 29073:30525(1452) ack 84 win 5840
03:38:37.399291 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 30525:31977(1452) ack 84 win 5840
03:38:37.439391 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 21813 win 17424
03:38:37.439397 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: P 31977:33429(1452) ack 84 win 5840
03:38:37.439400 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 33429:34881(1452) ack 84 win 5840
03:38:37.439402 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 34881:36333(1452) ack 84 win 5840
03:38:37.449379 IP 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server > 121.11.144.174.8810: . ack 24717 win 17424
03:38:37.449385 IP 121.11.144.174.8810 > 43.56.82.218.broad.xw.sh.dynamic.163data.com.cn.ms-wbt-server: . 36333:37785(1452) ack 84 win 5840
看以上记录,滑动窗口都正常的,速度接收正常.
但发现有少部分客户机,譬如是网通连接电信的,出现如下情况:
20:22:10.529286 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 7293 win 640
20:22:10.944991 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 7293:7933(640) ack 84 win 5840
20:22:11.186660 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 7933 win 640
20:22:11.603928 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 7933:8573(640) ack 84 win 5840
20:22:11.842146 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 8573 win 640
20:22:11.842158 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 8573:8745(172) ack 84 win 5840
20:22:12.061018 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 8745 win 640
20:22:12.480856 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 8745:9385(640) ack 84 win 5840
20:22:12.717633 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 9385 win 640
20:22:13.138786 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 9385:10025(640) ack 84 win 5840
20:22:13.373375 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10025 win 640
20:22:13.373383 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10025:10197(172) ack 84 win 5840
20:22:13.592373 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10197 win 640
20:22:14.014708 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10197:10837(640) ack 84 win 5840
20:22:14.248240 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 10837 win 640
20:22:14.671643 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 10837:11477(640) ack 84 win 5840
20:22:14.905233 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 11477 win 640
20:22:14.905241 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 11477:11649(172) ack 84 win 5840
20:22:15.124355 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 11649 win 640
20:22:15.548561 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 11649:12289(640) ack 84 win 5840
20:22:15.779845 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 12289 win 640
20:22:16.206498 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 12289:12929(640) ack 84 win 5840
20:22:16.436849 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 12929 win 640
20:22:16.436859 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 12929:13101(172) ack 84 win 5840
20:22:16.654347 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 13101 win 640
20:22:17.080418 IP 121.11.144.174.8810 > 220.181.35.147.eoss: P 13101:13741(640) ack 84 win 5840
20:22:17.311578 IP 220.181.35.147.eoss > 121.11.144.174.8810: . ack 13741 win 640
请观察时间和滑动窗口,发现速度很慢,滑动窗口也很小.
请问有没人知道是什么造成这样的,客户机和服务器之间速度不应该这样慢的,我直接通过web连接下载文件测试,发现很快的.
|
这种情况说明通信线路不好,有可能是中间的路由器问题。
你下载文件快可能是由于通信线路经由别的链路传输的。
你下载文件快可能是由于通信线路经由别的链路传输的。
|
可能的原因有2个:
1、客户端或者服务器端的缓冲区阻塞
2、中间的某个链路的问题
1、客户端或者服务器端的缓冲区阻塞
2、中间的某个链路的问题
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。