i suggest you read this page and many more pages like it

To Test Connections by Using Ping.exe
You can use the ping command as a troubleshooting tool to sequentially test connectivity to various network resources. To ping a network host directly:
1. Click Start, click Run, type cmd, and then press ENTER.
2. Type ping IP address of the remote network host (for example, ping 192.168.1.104) or ping host name (for example, ping www.microsoft.com), and then press ENTER.
3. Check for a reply that may look like this:
Reply from 192.168.1.104: bytes=32 time=40ms TTL=61
If this message displays, the server is available on the network. If you are unable to contact the resource, you can troubleshoot the connection by using the ping command to test connectivity to various network resources:
a. Ping the loopback address (by using the ping 127.0.0.1 command) to verify that TCP/IP is installed and working correctly on the local computer.
b. Ping the IP address of the local computer to verify that it was added to the network correctly.
c. Ping the IP address of the default gateway to verify that the gateway is functional and it is possible to connect to a local host on the local network. You can obtain the IP address of the local default gateway by using the ipconfig command.
d. Ping the IP address of another remote host to verify that you can communicate through a router.