为什么我的测试机TCP四次挥手少了一次


正常的TCP四次挥手
正常的四次挥手
百度HTTP数据包抓取,四次挥手成功。
百度抓包
下面是本机到测试服务器TCP挥手包
抓包图一
本机发送了FIN与ACK标记,到测试服务器。
抓包图片二
不知道中间为什么少了一次,但是HTTP请求返回的数据是正常的。服务器返回ACK与FIN标记给本机
抓包图片三
本机发送ACK标记,给测试服务器

本机环境:
IP:192.168.1.137
系统:Windows 7 64 旗舰版
测试机:
IP:192.168.1.233
http环境为:nginx-1.2.4 + php-5.2.14
操作系统:Centos 6.3 64
内核参数为(其实就是默认):
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296

请求方式为:curl 192.168.1.233

补上tcpdump结果,评论不能显示换行:
[root@test ~]# tcpdump -i eth0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:31:09.285588 IP 192.168.1.137.63893 > 192.168.1.233.http: Flags [S], seq 865600233, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
14:31:09.285644 IP 192.168.1.233.http > 192.168.1.137.63893: Flags [S.], seq 1338047556, ack 865600234, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
14:31:09.286408 IP 192.168.1.137.63893 > 192.168.1.233.http: Flags [.], ack 1, win 16425, length 0
14:31:09.286500 IP 192.168.1.137.63893 > 192.168.1.233.http: Flags [P.], seq 1:78, ack 1, win 16425, length 77
14:31:09.286516 IP 192.168.1.233.http > 192.168.1.137.63893: Flags [.], ack 78, win 115, length 0
14:31:09.659720 IP 192.168.1.233.http > 192.168.1.137.63893: Flags [P.], seq 1:423, ack 78, win 115, length 422
14:31:09.660104 IP 192.168.1.137.63893 > 192.168.1.233.http: Flags [F.], seq 78, ack 423, win 16319, length 0
14:31:09.660186 IP 192.168.1.233.http > 192.168.1.137.63893: Flags [F.], seq 423, ack 79, win 115, length 0
14:31:09.661140 IP 192.168.1.137.63893 > 192.168.1.233.http: Flags [.], ack 424, win 16319, length 0

network 网络

霜是月魂魄 11 years, 7 months ago

TCP不是三次握手的么。。。

淘气D雅美 answered 11 years, 7 months ago

Your Answer