Home > Article > Operation and Maintenance > Several reasons why Linux cannot ping
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. Use the "ping" command to check whether the network is connected.
(Recommended learning: linux tutorial)
If ping fails, you can find the cause of the fault in the following ways:
1 , ping 127.0.0.1
127.0.0.1 is the local loop address. If this address cannot be pinged successfully, it means that the local machine TCP/IP protocol cannot work properly.
2. Ping the IP address of the machine
Use IPConfig to check the IP address of the machine, and then ping the IP. Generally, it means that the network adapter (network card or MODEM) is working normally. If not, it means that the network adapter has appeared. Fault.
3. Ping the IP of a computer on the same network segment.
Ping the IP of a computer on the same network segment. If there is no connection, it indicates that the network line is faulty. If the network also contains a router, you should first Ping the IP address of the router's port on this network segment. If the IP address fails, then there is a problem with the line in this segment. Generally, ping the IP address of the router port on the network segment where the target computer is located. If the IP address is unavailable, it means there is a routing failure. Generally, ping the IP address of the destination computer.
4. Ping URL
If you want to detect a network with DNS service, if you still cannot connect to the target computer after pinging the IP address in the previous step, you can PING the computer. The network name of the machine, such as Ping sina.com.cn. Under normal circumstances, the IP pointed to by the URL will appear. This indicates that the DNS settings of the machine are correct and the DNS server is working normally. Otherwise, one of them may be faulty; You can also detect WINS resolution failures by pinging computer names (WINS is a service that resolves computer names to IP addresses).
The above is the detailed content of Several reasons why Linux cannot ping. For more information, please follow other related articles on the PHP Chinese website!