The centos7 server found that curl has an ip connection, but ping is not connected to the same ip?

Why is this problem?

ping is not available (ping one of Baidu"s 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

but curl can communicate


$ curl 220.181.57.216
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>

May I ask why? I can be sure that this ip can be ping, and my own computer can ping. After trying several IP, they are all in the same situation.


every node where ping needs to be routed supports ICMP protocol forwarding. In your case, the server firewall has disabled the ICMP protocol.

you can traceroute IP' each other on your machine and server respectively (use tracert on windows) to see which one skips

.

in fact, ping has nothing to do with curl . Most network troubleshooting starts with ping , so many beginners are misled into thinking that ping service must be connected, or vice versa.

in fact, this is a misunderstanding. The default protocol used by ping is ICMP , and you will find that it is not tcp/udp socket. So the server or firewall can implement reject ping by rejecting the ICMP protocol. So just because you can't ping doesn't mean your socket can't be accessed. There's no direct connection between the two. It's not a protocol at all.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4fd79-43d8f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4fd79-43d8f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?