Ping and Traceroute
All data sent over the internet is sent in packets. Consider the following analogy. The idea behind packets is very similar to the idea of the capsules used to send checking and savings information from your vehicle to tellers inside the bank via vacuum tubes. The emails you send and the files you download are all broken down into raw data and inserted into little packets. These packets are piped through your Internet connection. When a packet arrives at a destination computer, the data is extracted and reassembled into a file.
Ping and Traceroute are two programs that can be used to send packets of information to remote computers for the purpose of retrieving information. These programs are useful for testing your internet connection.
To use Ping and Traceroute you will need a command prompt:
Windows
- Click the Start button and select Run.
- Enter command or cmd into the Open field.
- Click OK. A windows command prompt screen should look like the example below:
|
Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001.
C:\WINDOWS>
|
Macintosh OS X
- Open your Harddrive.
- Open the Applications folder.
- Open the Utilities folder.
- Double click Terminal.
Macintosh OS 8-9 does not have a terminal/command prompt application available with the operating system. You will need to use a third-party network diagnostics program. We recommend
WhatRoute. Click here to download WhatRoute from Tucows.
PING
Ping can test the speed of your connection, "distance" to target, and whether or not your connection is even up and running. It tells you how long a packet of data takes to travel from your computer to a specified host, and back again(in this case, the packet is 32 bytes in size).
To use Ping, type ping followed by a destination host (server name such as www. Window Rock.net) or a host IP address (e.g., 209.166.161.121).
Ping Tests
Once you have your command prompt (or WhatRoute) open, enter ping
127.0.0.1 and press Enter. You should receive 4 responses similar to
the lines below. This ping test verifies the operation of the base TCP/IP stack.
If TCP/IP is working correctly, there will be no problems with the ping. If you
receive a timeout or error message, there is a problem with TCP/IP in which case
you may have to uninstall and reinstall TCP/IP.
|
C:\WINDOWS>ping
127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from
127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32
time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms 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
|
Ping your IP* and press Enter. The "XXX" indicates your IP
address and can be found by using the ipconfig /all
command. Pinging your IP verifies that the physical network device can be
addressed. If you cannot ping your own IP address, make sure the IP is correctly
entered in the Network Control Panel (NCP). If it is correct, replace TCP/IP. If
this does not work, the network card may not be properly installed or 'bad' in
which case you may need to reinstall the NIC.
|
C:\WINDOWS>ping
209.166.xxx.xxx
Pinging 209.166.xxx.xxx with 32 bytes of data:
Reply from 209.166.xxx.xxx: bytes=32 time<1ms TTL=44 Reply from
209.166.xxx.xxx: bytes=32 time=1ms TTL=44 Reply from 209.166.xxx.xxx:
bytes=32 time=2ms TTL=44 Reply from 209.166.xxx.xxx: bytes=32 time<1ms
TTL=44
Ping statistics for 209.166.xxx.xxx:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip
times in milli-seconds: Minimum = 0ms, Maximum = 2ms,
Average = 1ms |
Enter ping 209.166.161.121 and press Enter. This test checks
that your connection to the Internet is active and that the network can be
accessed. You should receive 4 responses similar to the lines below.
|
C:\WINDOWS>ping
209.166.161.121
Pinging 209.166.161.121 with 32 bytes of data:
Reply from 209.166.161.121: bytes=32 time<1ms TTL=44 Reply from
209.166.161.121: bytes=32 time=1ms TTL=44 Reply from 209.166.161.121:
bytes=32 time=2ms TTL=44 Reply from 209.166.161.121: bytes=32 time<1ms
TTL=44
Ping statistics for 209.166.161.121:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip
times in milli-seconds: Minimum = 0ms, Maximum = 2ms,
Average = 1ms |
Now enter ping www. Window Rock.net or another server name (e.g., www.yahoo.com) and press Enter. This test
checks that your computer is able to translate name addresses (like
www. Window Rock.net or www.yahoo.com) to numbers (like 209.166.165.174 or
64.58.76.224) - DNS resolution. You should receive 4 responses similar to the
lines below. If you do not receive responses, check your DNS configuration
settings. Click here
for DNS Servers.
|
C:\WINDOWS>ping www. Window Rock.net
Pinging corp01.web.pitdc1. Window Rock.net [208.40.175.241] with 32 bytes of data:
Reply from 208.40.175.241: bytes=32 time<1ms TTL=44
Reply from 208.40.175.241: bytes=32 time=1ms TTL=44
Reply from 208.40.175.241: bytes=32 time=2ms TTL=44
Reply from 208.40.175.241: bytes=32 time<1ms TTL=44
Ping statistics for 208.40.175.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 1ms
|
UNDERSTANDING THE OUTPUT
The first line is the command we typed: "ping www. Window Rock.net". Note the space between the command "ping" and the host computer "www. Window Rock.net."
The next line shows the full name of the host, as found by the ping program. The number 208.40.175.241 is the IP address of the host. An IP address is similar to your zip code. You may live in Pittsburgh, PA; but to the Post office, you are 15222-xxxx. The same goes for the internet, "www. Window Rock.net" is "208.40.175.241".
The next four lines show whether or not the host replied, with how many bytes (size of packet), round trip time (in milliseconds), and the TTL is how many routers the packet will go through before giving up trying to find the host.
The last lines show the statistics from pinging the host. They include how many packets were sent, received, and lost. Also shown are round trip times and averages.
INTERPRETING THE RESULTS
If all 4 packets sent are received, then the connection is working fine. Any lost packets may indicate slow connection problems. If no packets are received, you'll see like that say something like "Destination Host unreachable" or "Request Timed Out". This can indicate that your connection is not routing properly.
If you can not ping a domain name (i.e. www. Window Rock.net), try the IP address (i.e. 208.40.175.241). If pinging an IP address generates replies, but the domain name doesn't, then there is probably a DNS issue.
Read the story of how PING was created: http://ftp.arl.mil/~mike/ping.asp
TRACEROUTE
Traceroute tracks the path that a packet takes from your computer to a destination address. A traceroute also shows how many times your packets are being rebroadcast by other servers until it gets to the final destination. For windows users, the command is tracert. For Macintosh OS X users, its traceroute.
In this example we will trace the hops from a computer to yahoo.com:
|
C:\WINDOWS>tracert yahoo.com
Tracing route to yahoo.com [66.218.71.198] over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 208.170.243.1
2 44 ms 14 ms 18 ms sl-gw15-rly-6-0-1.sprintlink.net [144.232.246.165]
3 31 ms 25 ms 13 ms sl-bb22-rly-1-0.sprintlink.net [144.232.25.232]
4 21 ms 17 ms 17 ms sl-st20-ash-15-1.sprintlink.net [144.232.20.106]
5 15 ms 17 ms 19 ms so-0-0-0.edge1.Washington1.Level3.net [209.244.219.169]
6 16 ms 17 ms 15 ms so-5-0-0.gar1.Washington1.Level3.net [209.244.11.9]
7 82 ms 82 ms 82 ms so-3-0-0.mp2.SanJose1.Level3.net [64.159.1.130]
8 87 ms 87 ms 83 ms gige10-0.ipcolo3.SanJose1.Level3.net [64.159.2.41]
9 87 ms 84 ms 93 ms unknown.Level3.net [64.152.69.30]
10 90 ms 88 ms 92 ms w1.rc.vip.scd.yahoo.com [66.218.71.198]
Trace complete.
|
UNDERSTANDING THE OUTPUT
The first line is the command we typed: tracert yahoo.com. Note the space between the command "ping" and the host computer "yahoo.com."
The next line shows the traceroute program acquiring the ip address from the domain. "Maximum of 30 hops" is how many routers the packet will go through before giving up trying to find the host.
The next lines show each server the packets traveled through to get to the destination yahoo.com. These show both the IP address and domain name of the actual servers that the packets passed through.
INTERPRETING THE RESULTS
Traceroutes allow you to see the path your packets take over the Internet. Sometimes, they will also allow you to "see" how your information traveled over the world: Many companies will name their servers based on where the server is located. From our example above, our information passed from our computer to servers in Washington DC then through servers in San Jose before reaching its destination (yahoo.com).
Traceroutes can show where there is a break in your connection. This allows you to determine exactly where your packets are being dropped or lost. Dropped or lost packets on a traceroute will usually show as asterisks (*).
Ping and Traceroute allow you to diagnose problems with your Internet connection. These utilities allow you to determine if a problem is on your computer, out on the network, or at the server you're trying to reach.
|