关于服务器 ping 本地地址出现 dup 的问题

2017-11-19 11:46:41 +08:00
 sjx95

之前服务器 ping 有 dup 问题,一直没解决,不过想想这么拖着也不是个事,今天看了半天也没什么头绪,所以来 V2 问问大家有什么思路。

表现如下:

  1. 在服务器上 ping 本机的 loopback 地址和 v6 地址没事,但 v4 地址就会 dup (未经过路由器)
  2. ping 自己的 v4 地址时,会收到两个回包,一个ttl=64 time=0.048 ms,另一个ttl=128 time=0.201 ms (DUP!)
  3. ping localhost 时不会 dup,只会收到一个 ttl=64 time=0.059 ms
  4. ping v6 地址时也不会 dup,只会收到一个 ttl=64 time=0.074 ms
  5. 服务器用了 openSUSE Leap 42.2,以前 42.1 也有这问题。

wordpress 则表现正常,使用 WireShark 抓包时并没有发现 https 连接有这个现象。

7973 次点击
所在节点    Linux
7 条回复
LPeJuN6lLsS9
2017-11-19 15:34:41 +08:00
我的也是,openvz 的 vps。dup 的 ttl 也是 128。venet0:0 的广播地址和 ip 地址一样,很可疑但不懂
tcpdump 看了下,全部是在环回里发生的,tcp 也没问题,就不管了
sublimevsatom
2017-11-19 15:53:13 +08:00
这里有说明
http://www.gsp.com/cgi-bin/man.cgi?section=8&topic=ping#4
Duplicate and Damaged Packets
RalphHuang
2017-11-19 22:19:56 +08:00
Windows Server,做过 NLB 的,ping NLB 的虚 IP 也会出现这个现象,ping 各自的网卡 IP 就不会有这个现象,不明白是为啥
sjx95
2017-11-20 09:59:30 +08:00
@sublimevsatom 嗯,我知道 dup 是什么意思,可是会是什么原因造成的呢?
sjx95
2017-11-20 10:09:44 +08:00
@hantsuki 我是 KVM 的,看了一眼好像不是 loopback 里面产生的。。。
sublimevsatom
2017-11-20 17:56:37 +08:00
这里有说了一些原因,仔细看。
The ping utility will report duplicate and damaged packets. Duplicate packets should never occur when pinging a unicast address, 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. Duplicates are expected when pinging a broadcast or multicast address, since they are not really duplicates but replies from different hosts to the same request.
Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet ’ s path (in the network or in the hosts).
sjx95
2017-11-21 10:27:54 +08:00
@sublimevsatom 别说的好像我瞎一样好吧…
我这种情况,本机 ping 到本机,跟链路层大概没多少关系吧?就算是有关系,那怎么解释 ICMPv6 工作正常不会 dup ?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/407641

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX