Ping: The Network Troubleshooter's Favorite Tool

 

We've all seen old war movies in which submarine crews use - "sonar" - to sense the location of other subs or underwater objects.

Modern sonar sets work by driving a powerful underwater speaker with a loud - "ringing" - pulse that sends sonic shock waves radiating outward at the speed of sound. When those waves strike a nearby object, some of their energy is reflected back. An array of sensitive, directional microphones mounted back on the original submarine can hear the reflected sound waves and, by measuring the time interval between the outgoing sound and the detected reflection, can also be used to estimate the distance between underwater objects. Because reflected sound waves will strike some of the receiving microphones sooner than others, the received time intervals can even be used to estimate the direction from which each reflection is received. Thus, - "sonar" - becomes the - "eyes and ears" - or primary - "sensors" - through which the submarine crew learns of their underwater surroundings and avoids trouble.

Submarine crewmembers report that they can always hear the sound pulses emanating from the sonar equipment. They often use the word - "Ping" - to describe the penetrating, ringing sound, and once a crewmember becomes accustomed to it, the sound of a - "ping" - can bring a sense of comfort and well-being, as if it could reassure the entire crew that the outside world is constantly being assessed and understood.

The world of computer networking and internetworking also uses a tool like this. It allows one computer to generate a pulse-like - "signal" - message that can be - "bounced" - back from some other computer, router, or other piece of networking equipment. The official name of this network diagnostic tool is - ICMP Echo Request / Reply (where - ICMP - stands for - "Internet Control Message Protocol"), but the analogy with submarine sonar is so strong that it has become universally known by it's informal nickname - "Ping".

Every modern computer operating system includes some implementation of the - "ping" - utility.


On a computer running Microsoft Windows, ping is best used from a command-line window. (You can always launch a command-line window by clicking on - "Start", - "Run", - and then by typing - "C M D" into the resulting dialog box. When you then click "OK", a big, rectangular, black window will be displayed on your Windows - "desktop", as illustrated here).

When you use - "Ping" - you will command your computer to create a short message and to send it out across your local network toward some other computer, which you will designate via an IP address. If the destination IP address is on some other network (beyond your own LAN), then it will be routed out onto the worldwide Internet through your router or - "Default Gateway" device. Accordingly, your command line must include the IP address of some computer.


By common agreement between all Internetwork equipment manufacturers, any well-behaved computer or router that receives a - "ping" - request is expected to immediately send a - "ping reply" - message back to the originating computer.

Thus the - "ping" - command is universally employed as the most basic form of Internet diagnostic tools. If you ever suspect that your computer is having trouble connecting with the Internet or with some other computer, printer, or gateway device on your own local network, you can construct a - "ping" - command to test your connection.


The simplest use of - "ping" - requires that you know the IP address of your own computer's primary network connection. You can always learn the IP address(s) of your own network interfaces by issuing the - ipconfig - command as shown here:

You can learn more about IP addresses by reviewing other movies here at AskMisterWizard.com (especially the one entitled "Configuring Your Internet Connection Part 1: the Dynamic Host Configuration Protocol"). The resulting command dialog should look a lot like this:

If your own computer is properly configured for Internet access, it's interface will respond to the - "ping" - message with a brief, return message of its own, as if to say - "I received your ping message, and this is my response." The ping utility will immediately display a summary, including information on the time interval between sending each outgoing message and receipt of the corresponding response. When pinging your own local network interface, the time interval (usually expressed in milliseconds), should be very short, as illustrated here.

You can interpret that message as confirmation that your own network interface, inside your own computer, is working as expected.


Once you have that assurance, it's a good idea to try pinging a nearby computer on your own network. You will need to know the IP address(es) of the computers and computer equipment in your own home or small office. You can learn a lot about the organization and management of your own local area network (and the associated IP addresses) from the AskMisterWizard.com movie entitled "Managing Your Network Equipment With Your Web Browser".


It is always useful to ping the local interface of your NAT router. If it responds within a few milliseconds as illustrated here, you have confirmation that all of the intervening connections are working and are properly configured. This is a great way to verify that your local network is intact and ready to interact, through your DSL or Cable Modem, with your Internet Service Provider. If you don't see the expected response from your own router, you'll need to examine all of the intervening wires, connectors, and interfaces, configuring each as necessary until you get a reliable ping.


After that, try pinging some well-known computer out on the worldwide Internet. For our purposes in this movie, we are going to select "mit.edu" the main gateway router leading to the campus network at the Massachusetts Institute of Technology. Let's illustrate that router right here.

As shown in this illustration from inside the Internet, we can access this router through a series of other routers leading from our own Internet Service Provider.

Accordingly, when we use the the - "ping" - utility from inside our own computer on our own network, a series of brief messages are addressed to mit.edu and are transmitted, through our own NAT router and cable or DSL modem, through our own ISP, through the Internet to MIT. Upon receipt, MIT's main router constructs a response message and sends it back to us. The most popular ping utilities send four separate messages at one second intervals.

(Because these messages are assigned a low priority on the Internet, we might expect a slight delay receiving one or more of the response messages. If the router at MIT or any of the intervening routers is saturated with higher-priority traffic, one or more of the queries or responses might become entirely lost. An occasional lost ping packet should be interpreted as an indication of a network node that is very busy, but it does not indicate any kind of a serious failure.)

With experience, you'll become very comfortable using - "ping" - to verify proper connection of your Internetworked computers and other equipment. You should always be able to ping your own computer and all of the other computers on your own network. Whenever your Internet Service Provider is giving you proper service, you should also always be able to ping other well-known locations on the worldwide Internet. Take advantage of the information found here and in other movies at AskMisterWizard.com to identify problem areas and to keep your network running at its best!