2-1120
Catalyst 6500 Series Switch Command Reference—Release7.6
78-15328-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands
traceroute
Usage Guidelines To interrupt traceroute after the command has been issued, press Ctrl-C.
The traceroute command uses the TTL field in the IP header to cause routers and servers to generate
specific return messages. Traceroute starts by sending a UDP datagram to the destination host with the
TTL field set to 1. If a router finds a TTL value of 1 or 0, it drops the datagram and sends back an ICMP
“time-exceeded” message to the sender. The traceroute facility determines the address of th e f irst hop b y
examining the source address field of the ICMP time-exceeded message.
To identify the next hop, traceroute again sends a UDP packet but this time with a TTL value of 2. The
first router decrements the TTL field by 1 and sends the datagram to the next rout e r. The second rout e r
sees a TTL value of 1, discards the datagram, and returns the time- ex ceed ed me ssag e to the s ourc e. Th is
process continues until the TTL is incremented to a value large enough for the datagram to reach the
destination host (or until the maximum TTL is reached).
To determine when a datagram has reached its destination, traceroute sets the UDP destination port in
the datagram to a very large value that the destination host is unlikely to be using. When a host receiv es
a datagram with an unrecognized port number, it sends an ICMP “port unreachable” err or to the source.
This message indicates to the traceroute facility that it has reached the destination.
Catalyst 6500 series switches can participate as the source or destination of the traceroute command.
However, because they are Layer2 devices, Catalyst 6500 series switches do not examine the TTL field
in the IP header and do not decrement the TTL field or send ICMP time-exceeded messages. Thus, a
Catalyst 6500 series switch does not appear as a hop in the traceroute command output.
Use the tos option to see if different types of service cause routes to change.
Examples This example shows how to use the traceroute command to determine the path from the source to the
destination host server10:
Console> (enable) traceroute server10
traceroute to server10.company.com (172.16.22.7), 30 hops max, 40 byte packets
1 engineering-1.company.com (172.31.192.206) 2 ms 1 ms 1 ms
2 engineering-2.company.com (172.31.196.204) 2 ms 3 ms 2 ms
3 gateway_a.company.com (172.16.1.201) 6 ms 3 ms 3 ms
4 server10.company.com (172.16.22.7) 3 ms * 2 ms
Console> (enable)