Tip

The power of ping

Douglas A. Paddock, SearchWindowsManageability.com Ask the Expert advisor

Ping is one of the first (and handiest) tools in your troubleshooting arsenal. Ping is a basic Internet program that lets you verify that a particular IP address exists and can accept requests.

To be more specific, ping is an Internet Control Message Protocol (ICMP) protocol utility used to check connectivity on networks. ICMP is a Network layer protocol in the seven-layer Open Systems Interconnection (OSI) model. A ping packet is also called an Echo Request and is sent as an IP (Internet Protocol) datagram. Because ping packets are sent as IP datagrams, they are not considered reliable, in that the IP layer doesn't check for proper delivery of the packet. A packet sent back by the machine being pinged in response to your Ping Request is an Echo Reply.

In order to ping another computer, or host, simply type: "ping IP-ADDRESS" (ex. ping 192.168.2.88).

To ping someone by name, simply type, "ping london.nwtraders.msft." (You don't need the period or the quotation marks.)

What can you do with ping? For one thing, if you cannot connect to a host, you can use the following steps with ping to check network connectivity between your host and the remote system.

  1. Ping someone by name on the other side of your router. For example, ping london.my.com, where london.my.com is the fully qualified domain name of a server on the other side of a router from you. Since you are pinging the remote computer by name, if this works, you know name resolution is working,

    Requires Free Membership to View

  1. and your network is OK through the router to that point. Since ping only works up to the network layer, it will not help if you are having any non-connectivity related problems with applications like Microsoft Office, etc., since it doesn't check anything higher than the network layer.

  2. If Step 1 doesn't work, try pinging your loop back adapter (ping 127.0.0.1). This will usually be successful unless TCP/IP is not installed and configured correctly on the local machine. By the way, if you try the ping command and get a message that ping is not recognized as a command or file name, either the TCP-IP protocol isn't installed, or it has major difficulties (i.e. corrupted, files missing, etc).

  3. Ping your PC's IP address to make sure it was added to the network correctly. If your IP address was not added to the network correctly you will need to correct this. This problem often happens when administrators are manually adding IP addresses to hosts on the network and they simply make a mistake inputting the IP address information. Dynamic Host Configuration Protocol (DHCP) is preferred by most administrators when assigning IP addresses for this reason. Since DHCP automatically assigns addresses, it doesn't make typos.

  4. Ping your default gateway to see if you can reach it. If you can't ping the default gateway, try pinging a computer close to you on the same subnet to see if the gateway is malfunctioning.

  5. Ping a computer on the other side of the gateway by IP address. If you can do this, but can't do step 1, name resolution isn't working.
Listed below are common ping error messages you may find when pinging. (These are taken directly from Windows 2000 Help):
  • A response of "destination net unreachable" means there was no route to the destination. You need to check the routing table on the router listed in the "Reply from" address in the "Destination net unreachable" message. For more information about the routing table, see Understanding the IP routing table. A response of "request timed out" means that there was no response to the ping in the default time period (1 second).

  • "A router is down." To check the routers in the path between the source and the destination, use the tracert command. For more information, see Using the tracert command.
  • "The destination host is down." Physically verify that the host is running or check connectivity through another protocol.

  • "There is no route back to your computer." If the host is running, you can check for a return route by viewing the default gateway and local routing table on the destination host.

  • "The latency of the response is more than one second." Use the -w option on the ping command to increase the time-out. For example, to allow responses within 5 seconds, use ping -w 5000.
Another very handy utility in Windows 2000 is PATHPING. You can find PATHPING under Windows 2000 help.

About the author: Douglas Paddock is an MCSE, MCT, MCSA, A+, N+ qualified teacher at Louisville Technical Institute in Louisville, Ken.

MORE INFORMATION LINKS:

Get more information about ping
Get more information about OSI

This was first published in September 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.