<<

Guide to Ping and Commands

When communicating through a network, a computer sends small packets of information through a series of other computers called routers until they reach their destination.

Ping and traceroute are commands/utilities that are used to troubleshoot connection problems. Using these commands/utilities, you can see a picture of how a packet travels through a network.  The ping checks to see that a device or website is available and how quickly you can access it.  The traceroute (also known as tracert) command maps the of a message as it travels through a network to another computer.

These commands are described in detail below.

Ping PING stands for “Packet Internet Groper.” Pinging an IP address or website means sending small packets of information out to a specific IP address and requesting a response from the recipient.

If the destination is reached, the recipient computer sends back an reply to acknowledge receipt. The ping command also reports information about the number of packets that were sent, received, and lost, as well as the round trip (in milliseconds) for sending the packets and receiving the echo response.

If no response is received within a certain time period, then the request times out.

You can ping a domain name (e.g. google.com) or an IP address (e.g. 206.190.36.45).

To ping on a Windows , you: 1. Right-click the menu and click Run. 2. Type cmd into the textbox and click OK. 3. In the command prompt, ping, then a space, and then the specific domain name/IP address. 4. Press Enter. You can also type ping/? into the command prompt to view a list of the various options to use the ping command.

To ping on a operating system, you open a terminal window and type ping, then a space, and then the specific domain name/IP address.

To ping on a Mac operating system, you: 1. Open the Applications folder and choose Utilities. 2. Choose and then ping. 3. Type the specific domain name/IP address. Or you can: 1. Open up Terminal. 2. Type ping, then a space, and then the specific domain name/IP address. 3. Press Enter.

1

Guide to Ping and Traceroute Commands

Wait for a few minutes until the ping command is complete.

This example shows pinging google.com.

A B

D E

A – command that you type B – domain name and corresponding IP address of the destination KEY: C – details of the echo replies received from the destination D – statistics showing what happened to the packets E – range of round-trip times to receive echo reply

The output of the ping command provides lots of information about what happened to the packets of information. Because the ping command can only communicate with IP addresses, it first looks up and displays the IP address that corresponds with the domain name.

The lines that follow show how many times the server the destination IP address replied. If the communication was successful, you will see the round-trip time of each echo response in milliseconds. If there was a problem in the transmission, you will receive an error message.

The final lines display the overall statistics for the ping, including the success rate of the packets reaching their destination and the range of round-trip times.

Traceroute Running a traceroute, also called tracert on some operating systems, means sending small packets of information out to a specific IP address and documenting the path that the packets take as they travel there.

2

Guide to Ping and Traceroute Commands

The traceroute command lists all of the routers that the packets pass through until they reach their destination and the time between each stop, also known as a .

If the packet is unable to reach its destination, the traceroute results will show exactly where the transmission failed.

You can run a traceroute to a domain name (e.g. google.com) or an IP address (e.g. 206.190.36.45).

To run a traceroute on a Windows operating system, you: 1. Right-click the Start menu and click Run. 2. Type cmd into the textbox and click OK. 3. In the command prompt, type tracert, then a space, and then the specific domain name/IP address. 4. Press Enter.

To run a traceroute on a Linux operating system, you open a terminal window and type traceroute, then a space, and then the specific domain name/IP address.

To run a traceroute on a Mac operating system, you: 1. Open the Applications folder and choose Utilities. 2. Choose Network Utility and then Traceroute. 3. Type ashford.edu and click Trace. Or you can: 1. Open up Terminal. 2. Type traceroute, then a space, and then the specific domain name/IP address. 3. Press Enter.

Wait for a few minutes until the traceroute command is complete.

3

Guide to Ping and Traceroute Commands

This example shows running a traceroute to google.com.

A B

C D E

A – command that you type B – domain name and corresponding IP address of the destination KEY: C – number of hops D – round-trip time of each hop E – domain names or IP addresses of the routers at the end of each hop

The output of the traceroute command provides lots of information about what happened to the packets of information. The first line of the results shows your home router (assuming your computer is behind a router), and the next line represents your internet service provider (ISP). Each of the following lines represents a hop to a router that is farther away. The domain name on each line can give you clues about the location of the router; however, if the domain is not available, only its IP address will be displayed. If the traceroute is successful, the final line should represent the destination IP address that you specified.

If you see a * in a column, the command timed out before you received a response, could indicate . If the request times out, you should not consider that a successful hop.

In addition to showing each hop, the traceroute command also shows the round-trip time (in milliseconds) that it takes for a packet to travel to each router. These are the same numbers that you would see with the ping command. Since traceroute sends out three packets to each hop, you will see three different times for each hop. This gives you an idea of how consistent the connection is.

4