It is very common for friends who do back-end development to encounter the situation as shown in the figure below, which may lead to the whole problem. When troubleshooting problems, we can first check whether the server is still alive through the ping command as the first step.

Since you want to use the ping command, naturally also need to be familiar with the command related to some knowledge, to analyze.

The easiest way to use the ping command is to follow it with an IP address

> ping 8.8.8.8 ping 8.8.8.8 With 32 bytes of data: reply from 8.8.8.8: bytes =32 time =34ms TTL=114 Reply from 8.8.8.8: Bytes =32 time =35ms TTL=114 Reply from 8.8.8.8: bytes =32 time =34ms TTL=114 Reply from 8.8.8.8: bytes =32 time =33ms TTL=114 Ping statistics: Data packets: Sent = 4, received = 4, Lost = 0 (0% lost), estimated round-trip time (in milliseconds): Minimum = 33ms, maximum = 35ms, average = 34msCopy the code

Notice In Windows, the ping command sends packets for four times and then ends. In Linux, the ping command keeps sending packets. If you want to stop the packets, press CTRL + C.

Ping sends an ICMP request echo packet to the target host and waits for the response packet to be received. The program estimates packet loss rate (packet loss rate) and Round trip delay time (network delay, round-trip delay time) based on the time and the number of successful responses.

ICMP packets work at the network layer in the OSI seven-layer network model.

The operating system is responsible for this layer, that is, as long as the server is on and running properly, it can be pinged, indicating that the server is still alive. In this case, you need to find other ways to troubleshoot the problem.

The OSI seven – layer model is the content of computer network