host 解析名称,但 ping 和浏览器不解析

host 解析名称,但 ping 和浏览器不解析

我观察到以下情况间歇性行为:

$ host foo.bar.com
foo.bar.com has address 172.17.13.217
foo.bar.com has address 10.33.111.101
$ ping -c 5 foo.bar.com
ping: cannot resolve foo.bar.com: Unknown host
$ ping -c 5 172.17.13.217
PING 172.17.13.217 (172.17.13.217): 56 data bytes
64 bytes from 172.17.13.217: icmp_seq=0 ttl=248 time=10.557 ms
64 bytes from 172.17.13.217: icmp_seq=1 ttl=248 time=11.003 ms
64 bytes from 172.17.13.217: icmp_seq=2 ttl=248 time=13.226 ms
64 bytes from 172.17.13.217: icmp_seq=3 ttl=248 time=31.158 ms
64 bytes from 172.17.13.217: icmp_seq=4 ttl=248 time=10.573 ms

--- 172.17.13.217 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 10.557/15.303/31.158/7.989 ms
$ ping -c 5 10.33.111.101
PING 10.33.111.101 (10.33.111.101): 56 data bytes
64 bytes from 10.33.111.101: icmp_seq=0 ttl=223 time=81.886 ms
64 bytes from 10.33.111.101: icmp_seq=1 ttl=223 time=82.067 ms
64 bytes from 10.33.111.101: icmp_seq=2 ttl=223 time=82.340 ms
64 bytes from 10.33.111.101: icmp_seq=3 ttl=223 time=81.407 ms
64 bytes from 10.33.111.101: icmp_seq=4 ttl=223 time=81.368 ms

--- 10.33.111.101 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 81.368/81.814/82.340/0.377 ms

并且浏览器无法找到foo.bar.com

几分钟后,一切又恢复正常 - chrome 和pingfind都恢复正常foo.bar.com

是什么原因导致了这种现象?为什么host可以解决foo.bar.com,而pingchrome 却不能?除了等待几分钟,我还能做什么?

相关内容