What is ping?

Ping is a specific type of network packet termed an Internet Control Message Protocol (ICMP) packet. Pings run by sending a particular type of network traffic, called an ICMP echo request packet, to a particular interface on a computer or network device. If the device (and the attached network card) that received the ping packet is turned on and not limited from responding, the receiving machine will respond back to the originating machine with an echo reply packet.

It shows us that a host is alive and accepting traffic, it also provides other important information including the total time it needed for the packet to travel to the target and return. Pings also report traffic loss that can be used to gauge the reliability of a network connection.

To run the command from your Linux machine, open a terminal and write the following command:
“Ping destination_ip”
You will need to replace the “destination_ip” part of the command with the actual IP address or hostname of the machine you are trying to reach.

All recent versions of Linux and Windows contain the ICMP command. The main difference between the Windows and Linux version is that the Windows ping command will send 4 echo request packets then automatically stop, whereas the Linux ping command will continue to send echo request commands until you force it to stop. On a Linux system, you can force a ping command to stop sending packets by using the Ctrl + C combination.

How Ping was invented

The original PING command stood for “Packet Internet Groper”, and was a package of diagnostic utilities used by DARPA personnel to test the performance of the ARPANET. However, the modern Internet Ping command refers to a program was written by Mike Muuss in December, 1983, which has since become one of the most versatile and widely used diagnostic tools on the Internet. Muuss named his program after the sonar sounds used for echo-location by submarines and bats; just like in old movies about submarines, sonar probes do sound something like a metallic “ping”.

How Ping works

The Internet Ping program works much like a sonar echo-location, sending a small packet of information containing an ICMP ECHO_REQUEST to a specified computer, which then sends an ECHO_REPLY packet in return. The IP address 127.0.0.1 is set by convention to always indicate your own computer. Therefore, a ping to that address will always ping yourself and the delay should be very short. This provides the most basic test of your local communications.

How to use Ping

You can use the Ping command to perform several useful Internet network diagnostic tests, such as the following:

Access : You can use Ping to see if you can reach another computer. If you cannot ping a site at all, but you can ping other sites, then it is a pretty good sign that your Internet network is working and that site is down. On the other hand, if you cannot ping any site, then likely your entire network connection is down due to a bad connection.

Time & distance : You can use the Ping command to determine how long it takes to bounce a packet off of another site, which tells you its Internet distance in network terms. For example, a web site hosted on your neighbor’s computer next door with a different Internet service provider might go through more routers and be farther away in network distance than a site on the other side of the ocean with a direct connection to the Internet backbone.

If a site seems slow, you can compare ping distances to other Internet sites to determine whether it is the site, the network, or your system that is slow. You can also compare ping times to get an idea of which sites have the fastest network access and would be most efficient for downloading, chat, and other applications.

Domain IP address : You can use the Ping command to probe either a domain name or an IP address. If you ping a domain name, it helpfully displays the corresponding IP address in the response.

You can run the ping command on a Windows computer by opening a command prompt window and then typing “ping” followed by the domain name or IP address of the computer you wish to ping. You can list the available options for the Windows ping command with “ping -?”. Windows ping.png

Online ping : If you can’t use the Ping command from your own computer because of a firewall or other restriction, or want to do an Internet ping from another location than your own, you can use one of the following web sites that offer online ping services:

DNSStuff.com
his.com
pantomath.xyz

Remember when doing an online ping that the packets are sent from that web site, so the times that are returned reflect the path from that location and not from your computer. Nevertheless, a ping from an online web site can be useful to test if an address can be reached from different places around the Internet, to do comparative timing to test how long it takes to reach one site compared to others.

If the times returned by several online ping sites to an Internet address are consistently long, then the destination site’s network is likely having problems. On the other hand, if you can ping an address from an online ping site but not from your own computer, then there is likely some block in your network preventing you from communicating with that site.

ping is a specific type of network packet termed an Internet Control Message Protocol (ICMP) packet. Pings run by sending a particular type of network traffic, called an ICMP echo request packet, to a particular interface on a computer or network device. If the device (and the attached network card) that received the ping packet is turned on and not limited from responding, the receiving machine will respond back to the originating machine with an echo reply packet.

It shows us that a host is alive and accepting traffic, it also provides other important information including the total time it needed for the packet to travel to the target and return. Pings also report traffic loss that can be used to gauge the reliability of a network connection.

To run the command from your Linux machine, open a terminal and write the following command:
“ping destination_ip”
You will need to replace the “destination_ip” part of the command with the actual IP address or hostname of the machine you are trying to reach.

All recent versions of Linux and Windows contain the ICMP command. The main difference between the Windows and Linux version is that the Windows ping command will send 4 echo request packets then automatically stop, whereas the Linux ping command will continue to send echo request commands until you force it to stop. On a Linux system, you can force a ping command to stop sending packets by using the Ctrl + C combination.

How Would A Ping Test Fail?

There are a number of reasons why a ping test would fail. For instance, if you’re pinging a specific IP address on your local network and you enter the wrong IP for the host computer the attempt would fail because there is nothing to connect to.

However, the problem could be that the network isn’t properly configured. An incorrect IP could be the result of an incorrect subnet mask.

Subnet masks determine the valid range of a IP address for a network. If conducting a local ping test both machines should have IP addresses that are included in the subnet range.
Secondly, there could be firewall software blocking the ping requests. In this situation you’ll have to disable the firewall. However, when disabling such software please seek the guidance of an network or system administrator.
ping udp

Improper implementation of any network security system greatly jeopardizes information security and places your company at risk.

Lastly, the failure could come from a hardware failure such as a bad Ethernet adapter, cable, router, hub, etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.