Run a Traceroute Test

Use traceroute to determine the route packets take through a network to a destination.

About this task

If you originate the ping or traceroute operation from a device other than the switch to a routing IP interface associated with a VRF, the operation can fail if you use large packet sizes. For these situations, do not use packet sizes larger than the following:
  • Ping for VRF routes: 1472 bytes

  • Traceroute for VRF routes: 1444 bytes

Note

Note

Exceptions:

  • The CLIP Segmented Management Instance can support large packets for VRF routes.
  • If you originate the ping or traceroute operation from the switch, you can configure large datasizes and the operation functions properly.

Procedure

  1. Enter Privileged EXEC mode:

    enable

  2. Run a traceroute test:

    traceroute WORD<0-256> [<1-1176>] [-m <1-255>] [-p <1-65535>] [-q <1-255>] [-v] [-w <1-255>][grt [source]][mgmt [clip | oob | vlan]][source <WORD 1-256>] [vrf <WORD 1-16>]

  3. Run a traceroute test using a Segmented Management Instance:

    traceroute WORD<0-256> [<1-1176>] [-m <1-255>] [-p <1-65535>] [-q <1-255>] [-w <1-255>] [grt [source]] mgmt [<clip | oob | vlan>]

    Note

    Note

    If you do not use the mgmt parameter, the traceroute command uses the IP routing stack to initiate the traceroute request.

Examples

Run a traceroute test with a probe packet size of 200 and a max time to live of 60:

Switch:1>enable
Switch:1#traceroute 192.0.2.33 200 —m 60

Run a traceroute test for an IPv6 address:

Switch:1#traceroute 2001:db8::1

Run a traceroute test using the management routing table:

Switch:1#traceroute 192.0.2.12 mgmt

Run a traceroute test using a management CLIP:

Switch:1#traceroute 192.0.2.12 mgmt clip

Run a traceroute test using a management VLAN:

Switch:1#traceroute 192.0.2.12 mgmt vlan

Variable Definitions

The following table defines parameters for the traceroute command.

Variable

Value

-m <1-255>

Specifies the maximum time-to-live (TTL).

-p <1-65535>

Specifies the base UDP port number. The default is 33434.

Note:

If the traceroute action is directed to an IPv6 host address, Linux increments the UDP port on a per-TTL basis. For an IPv4 host address, Linux increments the UDP port on a per-probe basis.

Because the traceroute command sends a default of three probes, three incrementing ports will be sent for an IPv4 host address. If you use the -p parameter with a value greater than 65533, the traceroute command fails for an IPv4 host address because the maximum port number, 65535, is exceeded.

If you send a traceroute probe into the device through the Segmented Management Instance or any routing interface, you must use the default UDP port range of 33434 to 33534. Using other ports will fail.

-q <1-255>

Specifies the number of probes per TTL.

-v

Specifies verbose mode (detailed output).

This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter.

-w <1-255>

Specifies the wait time for each probe.

<1-1176>

Specifies the size of the probe packet.

grt

Specifies the traceroute command is executed in grt context.

mgmt [<clip | oob | vlan>]

Note:

Exception: oob not supported on 5320 Series

Specifies the Segmented Management Instance as the source for the outgoing packet. The packet goes out this specific interface only.

If you do not specify the management interface type, the traceroute command uses the management routing table to determine the best management interface and selects the source IP based on the egress management interface.

source <WORD 1-256>

Specifies the source IP address.

This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter.

WORD<0-256>

Specifies the destination IPv4 or IPv6 address, or hostname.

vrf <WORD 1-16>

Specifies the VRF instance by VRF name.

This parameter does not apply if you use the mgmt [clip | oob | vlan] parameter.