The reason for the failure of ping under linux
Ping is a command under Windows, Unix, and Linux systems. Ping also belongs to a communication protocol and is part of the TCP/IP protocol. The "ping" command can be used to check whether the network is connected.
If the ping is not available, you can find the cause of the failure in the following ways:
1 、 ping 127.0.0.1
127.0.0.1 is a local circular address. If this address cannot Ping, it means that the local TCP/IP protocol is not working properly.
2. The local IP address of Ping
Check the native IP with IPConfig, and then Ping the IP. The general rule indicates that the network adapter (network card or MODEM) is working properly. If it fails, the network adapter fails.
3. IP of computers with the same network segment of Ping
Ping, if the IP of a computer in the same network segment fails, it indicates that the network line is faulty; if there is a router in the network, you should first Ping the IP of the router on the port of the local network segment, and then there is a problem with this section of the line; if the general rule is to PING the port IP of the network segment where the target computer is located, it is a routing failure; if the general rule is to Ping the IP address of the destination machine.
4. Ping URL
If you want to detect a network with DNS services, you can PING the network name of the machine, such as Ping sina.com.cn, if you still cannot connect to the target computer after getting through the IP address in the previous step. Normally, the IP pointed to by this URL will appear, which indicates that the DNS setting of this machine is correct and the DNS server is working properly. Otherwise, it may be that one of them has a fault. Faults in WINS resolution can also be detected by Ping computer names (WINS is a service that resolves computer names to IP addresses).
These are the details of several reasons why linux can't ping. Please pay more attention to other related articles!