It seems that Ping was originally a sonar term to mean an audible wave of sound sent out to find an object. When the sound certainly hits an object, this encounter will produce sound waves whose reflection or echo will get back to its original source. This return of the sound wave can be measured in terms of time and direction. Then, distance and the object’s location can be defined.
Now, let’s jump from the ocean to computing and networking.
What is the Ping command?
The Ping command is a command line utility you can find pretty much in any operating system (OS) with network connectivity. A command line utility is a line of only text that can be entered on the command line of a computer to give it instructions for executing specific tasks.
It is a simple but very useful line of text when it is about testing different components of your network, like computers, IP addresses, routers, or a specific domain name. It can help you to check and detect connectivity issues, name resolution, and reachability. Once you understand its use, it can work for you in different and specific ways required by your business.
How does the Ping command work?
The Ping command works through echo requests and echo replies (messages) using the ICMP or the Internet Control Message Protocol, which is a basic component of IP networks.
When you use this command, it means you will send an echo request (data packet) to a specific address, the one of the system you want to test. The Ping command sends, by default, more than one echo request, usually four.
In a positive scenario, the remote system gets it. Then, it will answer by sending an echo reply (data packet). You will get the results of every echo request with the following useful information:
- The status of your echo request. You will know if it obtained a successful answer.
- The number of bytes received in response.
- The TTL value (time-to-live).
- The time that took to receive the answer.
- Information related to packet loss.
Interesting, isn’t it? And based on this information, you can know that the tested system exists and can process requests, also the time it takes for the packets to return, and be aware of the quality conditions of the communication through data like packet loss and response time.
In a negative scenario, the Ping command still provides valuable information. For instance:
- “Failed reply” shows the connection is broken at any point. The routes to reach that destination can be ok, but the destination system can be the problem.
- “Destination unreachable” can mean routing information to a subnetwork (subnet) is missing, or the system is down.
Conclusion
Another version of the Ping command’s name says it is short for Packet Inter-Network Groper. The sonar one draws a clearer picture of its use. In any case, just keep it in mind! Ping command can be that great teammate you need!