How the TRACEROUTE Command Works
The traceroute command is used to discover the routes that packets actually take when traveling to their destination. The device (for example, a router or a PC) sends out a sequence of User Datagram Protocol (UDP) datagrams to an invalid port address at the remote host.
Three datagrams are sent, each with a Time-To-Live (TTL) field value set to one. The TTL value of 1 causes the datagram to “timeout” as soon as it hits the first router in the path; this router then responds with an ICMP Time Exceeded Message (TEM) indicating that the datagram has expired.
Another three UDP messages are now sent, each with the TTL value set to 2, which causes the second router to return ICMP TEMs. This process continues until the packets actually reach the other destination. Since these datagrams are trying to access an invalid port at the destination host, ICMP Port Unreachable Messages are returned, indicating an unreachable port; this event signals the Traceroute program that it is finished.
The purpose behind this is to record the source of each ICMP Time Exceeded Message to provide a trace of the path the packet took to reach the destination.
In the following example, the packet must travel through two routers (157.54.48.1 and 11.1.0.67) to get to host 11.1.0.1. In this example, the default gateway is 157.54.48.1 and the IP address of the router on the 11.1.0.0 network is at 11.1.0.67.
Router#Traceroute 11.1.0.1
Tracing route to 11.1.0.1 over a maximum of 30 hops
1 2 ms 3 ms 2 ms 157.54.48.1
2 75 ms 83 ms 88 ms 11.1.0.67
3 73 ms 79 ms 93 ms 11.1.0.1
Trace complete.
The table below lists the characters that can appear in the traceroute command output.
IP Traceroute Text Characters
Character
|
Description
|
nn msec
|
For each node, the round-trip time in milliseconds for the specified number of probes
|
*
|
The probe timed out
|
A
|
Administratively prohibited (example, access-list)
|
Q
|
Source quench (destination too busy)
|
I
|
User interrupted test
|
U
|
Port unreachable
|
H
|
Host unreachable
|
N
|
Network unreachable
|
P
|
Protocol Unreachable
|
T
|
Timeout
|
?
|
Unknown packet type
|
Troubleshooting with TRACEROUTE
The TRACEROUTE command can be used to determine where a packet stopped on the network.
TRACEROUTE is useful for troubleshooting large networks where several paths can be taken to arrive at the same point, or where many intermediate systems (routers or bridges) are involved.
Comments
Post a Comment