Weekly quickTIP

Deconstructing PING

Like the sound of one hand clapping, ping's mystery comes to those who contemplate such things (or find this doc on the Internet).

Ahhh, "ping" -- the administrator's best friend when things go south. I'll bet like myself you've developed an almost unnatural ping reflex when the phone rings. For me, after all the years doing IT in one form or another, that "Windows button-R, cmd, ping {hostname}" keystroke sequence flies out of the fingertips before a conscious thought hits my frontal lobes. In a way, it's almost primal, like breathing or blinking one's eyes.

But in our daily pinging around the network, do we really have an idea of the exact meaning of its responses? I know that when I see anything other than those comforting two words "Reply from," I'll sometimes hit the panic button. But, in thinking about this column I realized that there's a lot more to ping than meets the eye. I wondered what "destination host unreachable" means and how specifically does this error message compare to "request timed out"?

So I did a little digging to turn up the official explanations, and found only one good document on the Internet that gave me the answers I'm looking for. That document, titled the "Windows 2000 Error Messages Reference," includes a run-down of every ping error message and what it specifically means. Here are a few, taken directly from the document:

Destination host unreachable: The host that you are trying to ping is down or is not operating on the network.

Destination net unreachable: The gateway reported that the network running the Internet Control Message Protocol (ICMP) for the IP address entered on the command line could not be reached.

Bad IP address: An invalid IP address was entered on the command line. The IP address must be entered in a dotted decimal format. Verify that the IP address that you are trying to ping is in the proper format.

Destination specified is invalid: An invalid address has been entered on the command line.

...and our old favorite...

Request timed out: The ping command timed out because there was no reply from the host. Ping your local address 127.0.0.1. This will tell you that TCP is functioning. It does not tell you that your network card is functioning. Ping your default gateway or next hop Router. This will show that the router is up. Ping beyond the next hop Router. If the ping fails, the request timed out can mean that the destination host is down or that there is no route back to you. Destination Net Unreachable will show the IP address of the Router that tried to route the packet but did not have a valid route.

As you can see, there is a big difference between "destination host unreachable" and "request timed out." This is particularly noticeable in Windows Vista, where ping's error messages have been tuned to be more specifically accurate. As such, a bad response in Vista has a tendency to get a different answer than the usual Windows XP "request timed out."

About the Author

Greg Shields is Author Evangelist with PluralSight, and is a globally-recognized expert on systems management, virtualization, and cloud technologies. A multiple-year recipient of the Microsoft MVP, VMware vExpert, and Citrix CTP awards, Greg is a contributing editor for Redmond Magazine and Virtualization Review Magazine, and is a frequent speaker at IT conferences worldwide. Reach him on Twitter at @concentratedgreg.

comments powered by Disqus
Most   Popular

Upcoming Training Events

0 AM
Live! 360 Orlando
November 17-22, 2024
TechMentor @ Microsoft HQ
August 11-15, 2025