Use the ping command to troubleshoot connectivity problems
Troubleshooting TCP/IP with Ping
The ping command sends and receives test packets between hosts. You can even ping the IP address reserved for the loopback interface, which is 127.0.0.1. Use ping to test connections for the following problems:
Connecting to other computers
Remote computers connecting to your site
Resolving Domain names
Contacting remote Sites
When you have problems connecting to other computers, there are a number of connections you should check. First, verify that ping can contact other computers on the Internet. For example, let us say you decide to check the Web server IP address of internic.net, which is 198.41.0.6. To do this, you type the command line:
ping 198.41.0.6
Output of ping command
This is the prompt from which the ping command was issued.
This line indicates that ping sent test data to 198.41.0.6 from 152.1.254.84.
These lines give information about each test packet received from rs.internic.net (198.41.0.6).
This section displays some statistics on the ping packets received before the user pressed Ctrl-C.
ping continues to check for a connection until you interrupt it by pressing Ctrl-C (simultaneously press the Ctrl and C keys).
Click the View Slideshow link to see the output of a typical ping session over a good connection. If you find you cannot connect with this method, your gateway address is probably misconfigured.
Can other hosts connect?
You can also verify that your computer is visible over the network using ping.
In fact, if you can receive a response to your ping, then the remote computer must have found a route back to your computer.
If you do not receive a response to the ping, your interface may be configured incorrectly.
If checking your interface configuration does not reveal any errors, contact the network administrator. There may be a routing problem with the gateway. If you can connect with ping, you should be able to connect using any properly configured network application.