traceroute
Syntax
traceroute {IPv4-address | hostname} [ip-option loosesourceroute ] [dstport | maxttl | minttl | probes | timeout] [vrf { | mgmt}]
Description
使用traceroute for the specified IPv4 address or hostname with or without optional parameters.
Command context
Operator (>
) or Manager (#
)
Parameters
-
ipv4地址
-
Specifies the IPv4 address of the device to use traceroute.
-
hostname
-
Specifies the hostname of the device to use traceroute.
-
ip-option
-
Specifies the IP option.
-
loosesourceroute
-
Specifies the route for loose source record route. Enter one or more intermediate router IP addresses separated by ',' for loose source routing.
-
dstport
-
Specifies the destination port,<1-34000>. Default: 33434
-
maxttl
-
Specifies the maximum number of hops to reach the destination,<1-255>. Default: 30
-
minttl
-
Specifies the Minimum number of hops to reach the destination,<1-255>. Default: 1
-
probes
-
Specifies the number of probes,<1-5>. Default: 3
-
timeout
-
Specifies the traceroute timeout in seconds,<1-60>. Default: 3 seconds
-
vrf
-
Specifies the virtual routing and forwarding (VRF) to use,
. -
mgmt
-
Specifies use of the management interface.
Authority
Operators or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.
Usage
Traceroute is a computer network diagnostic tool for displaying the route (path), and measuring transit delays of packets across an Internet Protocol (IP) network. It sends a sequence of User Datagram Protocol (UDP) packets addressed to a destination host. The time-to-live (TTL) value, also known as hop limit, is used in determining the intermediate routers being traversed towards the destination.
Examples
switch#traceroute 10.0.10.1traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute localhosttraceroute to localhost (127.0.0.1), 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 127.0.0.1 0.018ms 0.006ms 0.003ms switch#traceroute 10.0.10.1 maxttl 20traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 20 hops max, 3 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute 10.0.10.1 minttl 1traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute 10.0.10.1 dstport 33434traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute 10.0.10.1 probes 2traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 3 sec. timeout, 2 probes 1 10.0.40.2 0.002ms 0.002ms 2 10.0.30.1 0.002ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms switch#traceroute 10.0.10.1 timeout 5traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 5 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute localhostvrf redtraceroute to localhost (127.0.0.1), 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 127.0.0.1 0.003ms 0.002ms 0.001ms switch#traceroute localhostmgmttraceroute to localhost (127.0.0.1), 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 127.0.0.1 0.018ms 0.006ms 0.003ms switch#traceroute 10.0.10.1 maxttl 20 timeout 5 minttl 1 probes 3 dstport 33434traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 20 hops max, 5 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute 10.0.10.1 ip-option loosesourceroute 10.0.40.2traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 30 hops max, 3 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms switch#traceroute 10.0.10.1 ip-option loosesourceroute 10.0.40.2 maxttl 20 timeout 5 minttl 1 probes 3 dstport 33434traceroute to 10.0.10.1 (10.0.10.1) , 1 hops min, 20 hops max, 5 sec. timeout, 3 probes 1 10.0.40.2 0.002ms 0.002ms 0.001ms 2 10.0.30.1 0.002ms 0.001ms 0.001ms 3 10.0.10.1 0.001ms 0.002ms 0.002ms