This must be at least one of the most known command from the entire IT&C domain, especially from within network administration and system administration.

What is and also what does this command do ?

It is a network tool used mostly for troubleshooting network connectivity. With this command you can verify if a certain device can be accessed through an IP network. The reply message, or to be more precise the error message from a destination device can help you a lot in troubleshooting the errors you get on the network, or the problem you are facing on the network. I am trying to present to you the types of reply possible from a destination device, but in fact they are error messages, as a simple reply with no message means the connection is actually working, as you can see in below example.

The PING tool sends ICMP messages of type “Echo Request” (which would mean in other words, asking for a reply) through packets addressed to the device we are trying to query. Most of the times these devices we are testing are end devices like computers. What we expect from a computer who just got pinged is an ICMP reply type message also known as an Echo Response.

If we continuously send such messages using the PING command, the tool will calculate the delay it takes for replies to come back. Based on this, PING will estimate the time it takes for a round-trip (the time it takes for a signal to be sent plus the time it takes for an acknowledgment of that signal to be received: this is actually the time it takes for a signal to travel from a device to another and back) and also the packet loss rate between both devices.

This would be an example, however I had to remove some parts due to security risks:

PING command - Ping reply

As I didn’t have a test environment ready for this, you can see above how a ping to a computer name would look like.

The actual command and reply would be raw as you see it below:

C:\WINDOWS\system32>ping PsyCho-PCPinging PsyCho-PC [10.0.0.2] with 32 bytes of data:Reply from 10.0.0.2: bytes=32 time<1ms TTL=127
Reply from 10.0.0.2: bytes=32 time<1ms TTL=127
Reply from 10.0.0.2: bytes=32 time<1ms TTL=127
Reply from 10.0.0.2: bytes=32 time<1ms TTL=127Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

You could even PING a website because in the end would be a test between two computers: yours as the client computer and the hosting server for the website which would be the other computer.

The command could also provide a lot more details on other devices and may even differ at least for some parameters on systems like linux or devices like switches/routers. The above example is a PING from within a Personal Computer (Desktop) to another one, both of them using Windows XP.

There are many things to know in here but we will cover them in other posts, as thy are not the purpose of this guide. However, you should know that there are many factors that could block the PING command like, for example firewalls, filtering on different devices in the network you are trying to reach, routing and many others.

Now let’s see the most COMMON PING replies that you might encounter on your Internet adventure or network troubleshooting session.

  • Destination host unreachable: The device you are trying to PING is down or is not operating on the network. This could also mean you will have to recheck the settings on your device to make sure the host is correctly configured and also check that the routing is working properly because a route to the destination system could not be found. If you are trying to PING something outside of your local network, check if gateway address is correct.

  • Bad IP address: An invalid IP address was entered on the command prompt line. The IP address must be written in a dotted decimal format, for example 127.0.0.1. Check that the IP address is correct.

  • Destination net unreachable: The targeted gateway to the IP address written in the command prompt window could not be reached. Check your computer gateway to be correct and routing table to the IP address.

  • Destination specified is invalid: An invalid address has been written in the command prompt window. Make sure the format of the address is correct and then try again.

  • Request timed out: The ping command has timed out because there was no reply from the targeted device. First check if your TCP/IP stack is functioning correctly by pinging 127.0.0.1 . This doesn’t mean that your network card is working properly. Now ping your default gateway and make sure you have connectivity. Ping the next hop after the gateway or a device before our faulty device, like a router interface. If you have connectivity this could mean our faulty device, the one we get replies with “request timed out” from has a problem or may be down and not the network channel to the device. If you get reply from another device on the way, but not from the host we are troubleshooting, this could also mean there is no route back to your device. Note: Destination Net Unreachable will show the IP address of the router that tried to route a packet but couldn’t find a valid route.

  • TTL expired during reassembly: The TTL value defines the number of maximum hops a packet may live inside a network without reaching its destination, before being discarded. It’s actually the number of routers a packet may pass through network to destination, before being dropped. This means the TTL value was too small and it failed to reassembly either at the destination or on the local machine. Use -i parameter for PING command to increase TTL value.

  • TTL expired in transit: The TTL value defines the number of maximum hops a packet may live inside a network without reaching its destination, before being discarded. It’s actually the number of routers a packet may pass through network to destination, before being dropped. This means the TTL value was too small to reach the target and it failed on the way by being dropped. Use -i parameter for PING command to increase TTL value.

  • Hardware error: Ping your loop-back address 127.0.0.1 to verify that your TCP stack is working properly. If you can ping this, check the cable. Else you will have to troubleshoot the TCP stack and network interface card.

  • No resources: Means exactly what it says but it targets RAM memory most of times. Close some applications like the ones you don’t need right now and try again. If this fails, reboot your computer. Will work after.

I will add more errors on the way but I would encourage you to ask me or comment if you have one you don’t know what it stands for or one you just found out about it.

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
PING command - ICMP replies, 5.0 out of 5 based on 3 ratings