Networking / Beginners

Identifying Routers with tracert

If your network includes multiple routers, you can use the tracert (pronounced as "trace route") command to trace the path a packet takes through these routers. The tracert command can verify the path throughout an entire network.

tracert is similar to ping in that it checks connectivity. However, it also includes information on all routers between your computer and the destination computer.

Although the primary troubleshooting value of tracert is on internal networks, you can also use it to view the routing path to computers on the Internet.

The tracert command also uses ICMP. Although this normally works well, the results may be incomplete if ICMP is blocked.

Listing-5 shows the results of the tracert command from a home computer to the computer hosting the website. Notice in a few of the lines that the result indicates that the request timed out. This isn't because the path is faulty but instead because ICMP is being blocked.

Attackers often use ICMP to launch attacks. It's common for Internet systems to block ICMP traffic to protect against these attacks.

Listing-5: Output of tracert command
Tracing route to [] 
over a maximum of 30 hops: 
  1     3 ms    <1 ms    <1 ms   [] 
  2    10 ms     8 ms     9 ms 
  3    11 ms    11 ms    10 ms 
  4    14 ms    10 ms    13 ms 
  5    12 ms     9 ms     9 ms  
  6    16 ms    16 ms    54 ms 
  7    15 ms    15 ms    17 ms 
  8    17 ms    22 ms    18 ms  
  9    16 ms    17 ms    19 ms  
 10    41 ms    78 ms    40 ms  
 11    44 ms    40 ms    51 ms  
 12    93 ms    90 ms    92 ms  
 13    95 ms    93 ms    93 ms  
 14    95 ms    95 ms    94 ms 
 15    93 ms    94 ms    94 ms 
 16   142 ms    96 ms    97 ms  
 17   107 ms   181 ms   101 ms  
 18     *        *        *     Request timed out. 
 Trace complete. 

The tracert command identifies round-trip times for each hop listed in milliseconds (ms). Three different times are listed as tracert sends three separate probe requests by default for each hop. Shorter times indicate the trip is faster than longer times. You can see that the round-trips take progressively longer for each additional hop. Those routers are farther away.

The round-trip times are recalculated for each hop. Additional packets are sent for each router to calculate the round-trip time for that router.

It also lists the name of the routers when it can identify them. If tracert can't identify the name of the router, it just lists the IP address.

If the path between two systems is not working and tracert fails to complete, you can use the output to determine the location of the problem. For example, Listing-5 showed that the path was successful up to the 17th step. This indicates the 17th router from the source computer. The problem could be one of three things:

  • The routing information on the 17th router is incorrect. This will prevent the data from reaching the 18th router.
  • The 18th router is faulty.
  • ICMP is blocked on the 18th router.

Table-4 lists some additional switches you can use with the tracert command.

Table-4 Some tracert switches
Switch 				Comments
-4 tracert -4 	Forces the use of an IPv4 address instead of IPv6.
-6 tracert -6 	Forces the use of an IPv6 address instead of IPv4.
-d tracert -d 	Suppresses IP address to name resolution. Only the
				IP addresses are listed.
[Previous] [Contents] [Next]