It is very common for backend developers to encounter the situation shown in the figure below. There are many possibilities to cause the whole problem. When troubleshooting the problem, we can first check the server is still alive by ping as the first step.

Since you want to use the ping command, it is natural to be familiar with the command related to some points of knowledge, can be analyzed.

The ping command is most simply followed by an IP address

> 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 =33ms TTL=114 Packet: Sent = 4, Received = 4, Lost = 0 (0% lost), Estimated time of round trip (in milliseconds): Minimum = 33ms, Maximum = 35ms, Average = 34ms

Note that in
WindowEnvironmental use
pingThe command will send the message four times and then it will end, but
LinuxThe message will be sent continuously. If you need to terminate the message, please use the shortcut key
ctrl + c, the same is true for MAC.

Ping works by sending an ICMP request echo packet to the target host and waiting for the echo response packet to be received. The program will estimate the packet loss rate (packet loss rate) and packet round-trip time (network delay, round-trip delay time) according to the time and the number of successful responses.

ICMP messages work in the network layer of the OSI seven-layer network model.

This layer is taken care of by the operating system, which means that as long as the server is up and running, it can be pinging. This means that the server is still alive, and you need to find other ways to troubleshoot problems.

The OSI seven-layer model is the content of a computer network