Ping command – Everything you need to know

Computer networking has lots of tools. From the most simple to the most complex, all have interesting functionality that sooner or later can be useful for you. 

What’s the Ping command?

Ping command is a software utility for testing if the connectivity is working between two systems. In other words, the reachability of a host on a network.

Utility software is the one created for configuring, analyzing, maintaining, or optimizing machines. It supports computers’ infrastructure. Ping command is a very popular resource for diagnosis, and it’s available (built-in) on all operating systems.

Ping command syntax for Linux

Ping means Packet InterNet Groper. There’s an explanation about the origin of its name that helps a lot to visualize its purpose on networking. Ping is a sonar’s term. Sonar consists of the emission of sound pulses for measuring or detecting their return after they reflect on specific surfaces. 

In sonar’s context, ping is a sound wave that can be heard, emitted to detect an object. The idea is that sound will travel and eventually hit the object. Then the sound waves will get reflected (as echo) back to the emission’s source. By measuring the time of the sound waves’ return, the object’s distance and location can be defined.

How does the Ping command work?

Ping command works by sending an echo request to check the connectivity of a specific system. By default, the Ping command on Windows sends four packets (32-byte each) to the system which connectivity is going to be tested. Packets are sent through the Internet control message protocol (ICMP). The remote host will receive the echo request, and it will send back an echo answer.

Ping command emits a packet per second, and for each answer received, it shows a line of output. There can be some variations on the different operating systems. For instance, if you use Linux, the amount of sent packets is unlimited. You have to stop it (Ctrl+C). Otherwise, it will keep sending echo requests. Unix systems commonly send five echo requests.

The number of echo requests and their corresponding answers can be different, but the Ping command’s functionality is exactly the same.

Ping command provides the result for every sent request. The echo answer obtained supplies important information. Through it, the Ping command can know the distance of the remote host (calculating the number of hops), time to answer, packet loss, time-to-live (TTL), errors. It provides a very detailed report.

Ping command can complete its process by itself once the four or five echo requests (packets) are sent, and their results are shown. Or, you have to stop it, as it happens with Linux.

This command will efficiently inform the status of connectivity, positive or negative. A positive ping receives an answer from the pinged system. A negative ping usually results in a “time out” and 100% packet loss.

Example: 

ping google.com 

ping 216.58.206.206

Why use the Ping command?

  • Test connectivity. Using systems or applications on network connectivity is vital. A fast ping can confirm the two machines can communicate.
  • Monitoring. Through a ping, devices’ availability on a network and the own performance of the network can be checked.
  • Troubleshooting. Every echo answer provides clues to detect and solve problems. For instance, if the echo answers take time to arrive, this can point to a routing problem, sluggishness on the network, or congestion. 

Conclusion

Ping command is useful for detecting, diagnosing, and solving issues quickly. It’s easy to use. It is already included in your operating system. It’s waiting for you to try it and get the best out of it!

Related Posts

Leave a Reply

Your email address will not be published.