To discover the routes that packets actually take when traveling to their destination across an IP network, use the traceroute command in XR EXEC mode.
traceroute [ipv4 | ipv6] [host-name | ip-address] [ {source | ip-address-name | interface-name}] [numeric] [timeout seconds] [probe count] [minttl seconds] [maxttl seconds] [port number] [priority number] [verbose]
Syntax Description
ipv4
|
(Optional) Specifies IPv4 address prefixes.
|
ipv6
|
(Optional) Specifies IPv6 address prefixes.
|
host-name
|
(Optional) Hostname of system to use as the destination of the trace attempt.
|
ip-address
|
(Optional) Address of system to use as the destination of the trace attempt.
|
source
|
(Optional) Source address.
|
ip-address-name
|
(Optional) IP address A.B.C.D or hostname.
|
numeric
|
(Optional) Numeric display only.
|
timeout
seconds
|
(Optional) Timeout value. Range is 0 to 3600.
|
probe
count
|
(Optional) Probe count. Range is 0 to 65535.
|
minttl
seconds
|
(Optional) Minimum time to live. Range is 0 to 255.
|
maxttl
seconds
|
(Optional) Maximum time to live. Range is 0 to 255.
|
port
number
|
(Optional) Port number. Range is 0 to 65535.
|
priority
number
|
(Optional) Packet priority. Range is 0 to 15. Available when the
ipv6
keyword is specified.
|
verbose
|
(Optional) Verbose output.
|
Command Default
No default behavior or values
Command Modes
XR EXEC mode
Command History
Release
|
Modification
|
Release 7.0.12
|
This command was introduced.
|
Usage Guidelines
The default value for the traceroute command refers only to the destination. No default value is available for the destination address.
The traceroute command works by taking advantage of the error messages generated by networking devices when a datagram exceeds its time-to-live
(TTL) value.
The traceroute command starts by sending probe datagrams with a TTL value of 1, which causes the first networking device to discard the probe
datagram and send back an error message. The traceroute command sends several probes at each TTL level and displays the round-trip time for each.
The traceroute command sends out one probe at a time. Each outgoing packet may result in one or two error messages. A “time-exceeded” error
message indicates that an intermediate networking device has seen and discarded the probe. A “destination-unreachable” error
message indicates that the destination node has received the probe and discarded it because it could not deliver the packet.
If the timer goes off before a response comes in, the traceroute command prints an asterisk (*).
The traceroute command terminates when the destination responds, when the maximum TTL is exceeded, or when the user interrupts the trace
with the escape sequence, which is, by default, Ctrl-C. Simultaneously press and release the Ctrl and C keys.
To use nondefault parameters and invoke an extended traceroute test, enter the command without a host-name or ip-
address argument. You are stepped through a dialog to select the desired parameter values for the traceroute test.
Because of how IP is implemented on various networking devices, the IP traceroute command may behave in unexpected ways.
Not all destinations respond correctly to a probe message by sending back an “ICMP port unreachable” message. A long sequence
of TTL levels with only asterisks, terminating only when the maximum TTL has been reached, may indicate this problem.
There is a known problem with the way some hosts handle an “ICMP TTL exceeded” message. Some hosts generate an “ICMP” message,
but they reuse the TTL of the incoming packet. Because this value is zero, the ICMP packets do not succeed in returning. When
you trace the path to such a host, you may see a set of TTL values with asterisks (*). Eventually the TTL is raised high enough
that the “ICMP” message can get back. For example, if the host is six hops away, the
traceroute
command times out on responses 6 through 11.
Task ID
Task ID
|
Operations
|
basic-services
|
read, write, execute
|
Examples
The following output shows a sample traceroute session when a destination hostname has been specified:
Router# traceroute host8-sun
Type escape sequence to abort.
Tracing the route to 192.168.0.73
1 192.168.1.6 (192.168.1.6) 10 msec 0 msec 10 msec
2 gateway01-gw.gateway.cisco.com (192.168.16.2) 0 msec 10 msec 0 msec
3 host8-sun.cisco.com (192.168.0.73) 10 msec * 0 msec
The following display shows a sample extended traceroute session when a destination hostname is not specified:
traceroute # traceroute
Protocol [ipv4]:
Target IP address: ena-view3
Source address: 10.0.58.29
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 171.71.164.199
1 sjc-jpxlnock-vpn.cisco.com (10.25.0.1) 30 msec 4 msec 4 msec
2 15lab-vlan725-gx1.cisco.com (173.19.72.2) 7 msec 5 msec 5 msec
3 stc15-00lab-gw1.cisco.com (173.24.114.33) 5 msec 6 msec 6 msec
4 stc5-lab4-gw1.cisco.com (173.24.114.89) 5 msec 5 msec 5 msec
5 stc5-sbb4-gw1.cisco.com (172.71.241.162) 5 msec 6 msec 6 msec
6 stc5-dc5-gw1.cisco.com (172.71.241.10) 6 msec 6 msec 5 msec
7 stc5-dc1-gw1.cisco.com (172.71.243.2) 7 msec 8 msec 8 msec
8 ena-view3.cisco.com (172.71.164.199) 6 msec * 8 msec
This table describes the characters that can appear in traceroute output.
Table 6. traceroute Text Characters
Character
|
Description
|
xx msec
|
For each node, the round-trip time in milliseconds for the specified number of probes.
|
* |
Probe time out.
|
? |
Unknown packet type.
|
A
|
Administratively unreachable. This output usually indicates that an access list is blocking traffic.
|
H
|
Host unreachable.
|
N
|
Network unreachable.
|
P
|
Protocol unreachable.
|
Q
|
Source quench.
|
U
|
Port unreachable.
|