traceroute command

The traceroute command on a Cisco device can be used to identify the path used by a packet to reach its target. It identifies all the routers in the path from the source host to destination host and it can be useful when troubleshooting network problems. Using this command you can figure out which router in the path to an unreachable target should be examined more closely as the probable cause of the network’s failure.

Consider the following example network:

In the picture above you can see that we have a network of four routers. The network is working correctly. Consider what happens when we issue the traceroute command on R1 to the IP address of the router’s R4 Gi0/0 interface (172.16.0.2):

You can see that the traceroute command has listed the IP addresses of all of the routers in the path to the destination. Now let’s assume that the router R3 goes down. Consider the command output now:

Notice how there is no response from R3 (192.168.5.2). Using this information, we can assume that there is a problem with R3 and investigate the matter. The !H in the output indicates that the host is unreachable. Other character that can appear in the traceroute command output are: