为什么会出现这个问题?
ping不通(ping了百度其中一个ip)
$ ping 220.181.57.216
PING 220.181.57.216 (220.181.57.216) 56(84) bytes of data.
--- 220.181.57.216 ping statistics ---
80 packets transmitted, 0 received, 100% packet loss, time 78998ms
但是curl可以通
$ curl 220.181.57.216
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
请问为什么?可以肯定这个ip是可以ping的,我自己的电脑就能ping通,试了几个IP,都是同一个情况
ping通需要路由的每个节点都支持ICMP协议转发, 你的情况很可能是服务器防火墙把ICMP协议禁掉了.
你可以分别在你的机器上和服务器上互相用`traceroute IP`(windows上用tracert)试试, 看看是哪一跳过不去