It is small and very useful. There is a lot to know about the Ping command so let’s get started!
What is the Ping command?
Ping is a command line utility. It allows testing the reachability of the devices in a network. It is a helpful computer network tool to fix connectivity problems within networks. Any operating system (OS) with network connectivity should offer you the choice to use the Ping command.
How does Ping command work?
It sends a little data packet called ICMP echo request (Internet Control Message Protocol) to a specific host. The data packet includes a timestamp and a unique number that identifies it. The objective is that once this packet is received by the targeted host, it answers with an ICMP echo reply containing the same timestamp and identification number of the original data packet (ICMP echo request).
At the beginning of the process, when the we run the command by the sender host, it records the time when the echo request is sent. Then, it has to wait for the answer (echo reply). When it arrives, the Ping command calculates the round-trip time or RTT and shows it to you. RTT is the result of subtracting the echo request’s timestamp from the echo reply’s timestamp.
By default, the Ping command is set to send four data packets of 56 bytes each. But you can define, through the command, the number of packets to be sent, their size, the interval of time between them, and the destination IP address or hostname.
What can I use the Ping command for?
You can use this command to check if the Internet connection is working or not and if a device, website, application, or another Internet service is reachable or not.
Monitoring the performance of a network
If you use the command in a script to ping a host from time to time and you register the RRT values, this information will allow you to evaluate the performance of your network. You can identify patterns related to network latency.
The command measures the round-trip time (RRT) of messages sent to a specific host. Well, this is what you need to have a good reference of the general latency on your network. For instance, high RRT values can mean that the host’s location is far away or an issue within the network’s infrastructure.
Connectivity issues are not rare in networks. If you are having this problem with a host, this command helps you to check if it is reachable and to identify communication delays. If the host is not reachable, this can mean either the host is down or there is an error in the configuration of the network.
This is all you need to know about the Ping command. The next step is to start using it! It is the best way to feel its benefits and master its use!