标签为 "ping dup" 的存档

为什么ping对方ip会返回重复回应包呢?

ping同一个序号的ICMP包却收到了多个回应:

root@test:/var/www/db# ping mail.corp.qihoo.net
PING mail.corp.qihoo.net (220.181.158.203) 56(84) bytes of data.
64 bytes from 220.181.158.203: icmp_req=1 ttl=114 time=158 ms
64 bytes from 220.181.158.203: icmp_req=1 ttl=114 time=158 ms (DUP!)
64 bytes from 220.181.158.203: icmp_req=2 ttl=114 time=157 ms
64 bytes from 220.181.158.203: icmp_req=2 ttl=114 time=157 ms (DUP!)
64 bytes from 220.181.158.203: icmp_req=3 ttl=114 time=157 ms
64 bytes from 220.181.158.203: icmp_req=3 ttl=114 time=157 ms (DUP!)
^C
— mail.corp.qihoo.net ping statistics —
3 packets transmitted, 3 received, +3 duplicates, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 157.363/157.646/158.133/0.338 ms

man ping 这样说:

ping will report duplicate and damaged packets. Duplicate packets
should never occur, and seem to be caused by inappropriate link-level
retransmissions. Duplicates may occur in many situations and are
rarely (if ever) a good sign, although the presence of low levels of
duplicates may not always be cause for alarm.

首先重复的数据包确实是不应该出现的,然后如此稳定的重复现象也不像是“inappropriate link-level retransmissions”,多方搜索下来前辈们的意见是有这么几种可能:
1.网络中存在环路路由,static route
2.双机HA
3.两台虚拟机使用了相同MAC地址
4.HUB问题
5.ICMP REDIRECT
6./etc/tcp里面的配置手动改过,改错了,广播地址改成了你所要ping的ip地址
阅读更多…