Ping is a very useful command for troubleshooting basic networking setup. Is also used to keep connections alive. This is sometimes frowned upon. There are several utilities which will issue ping commands at regular intervals.
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list
| -t | ing the specifed host until stopped. To see statistics and continue - type
Control-Break; To stop - type Control-C. |
| -a | Resolve addresses to hostnames. |
| -n count | count Number of echo requests to send. |
| -l size | Send buffer size. |
| -f | Don't Fragment flag in packet. |
| -i ttl | TTL Time To Live. |
| -v tos | TOS Type Of Service. |
| -r count | Record route for count hops. |
| -s count | Timestamp for count hops. |
| -j host-list | Loose source route along host-list. |
| -k host-list | Strict source route along host-list |
| -w timeout | Timeout in milliseconds to wait for each reply. |
Examples:
1. I'm pinging 127.0.0.1 which is myself. The 127.0.0.1 is called loopback. Thus when receiving replies I know my basic TCP/IP setup is working. The times provided is the roundtrip times and the "Time to Live" is the hop count for the packets being sent. The roundtrip time here is very short since all I'm doing is a wrap around to myself
C:\>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Reply from 127.0.0.1: bytes=32 time<10ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Example 2:
Here I'm pinging Winfiles web site using the IP address; Normally, you would do this after having done one above. The first established that your basic setup is fine. This establishes that your internet connection is working fine
C:\>ping 207.159.129.102
Pinging 207.159.129.102 with 32 bytes of data:
Reply from 207.159.129.102: bytes=32 time=328ms TTL=250
Reply from 207.159.129.102: bytes=32 time=251ms TTL=250
Reply from 207.159.129.102: bytes=32 time=358ms TTL=250
Reply from 207.159.129.102: bytes=32 time=296ms TTL=250
Ping statistics for 207.159.129.102:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 251ms, Maximum = 358ms, Average = 308ms
It is not uncommon to get a few "request Timed out" responses.
Example 3
Here I'm pinging the same place as above. If the two first worked and this
does not, the most common problem is the DNS setup. It may also be caused by duplicates of
some of the winsock files in win95.
C:\>ping www.Winfiles.com
Pinging www3-pool.Winfiles.com [207.159.129.102] with 32 bytes of data:
Reply from 207.159.129.102: bytes=32 time=202ms TTL=250
Reply from 207.159.129.102: bytes=32 time=245ms TTL=250
Reply from 207.159.129.102: bytes=32 time=330ms TTL=250
Reply from 207.159.129.102: bytes=32 time=217ms TTL=250
Ping statistics for 207.159.129.102:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 202ms, Maximum = 330ms, Average = 248ms
Copyrighted All rights reserved
Last revised: May 29, 2005.