System Administration Guide: IP Services

Displaying Routing Information With the traceroute Command

The traceroute command traces the route an IP packet follows to a remote system. For technical details about traceroute, see the traceroute(1M) man page.

You use the traceroute command to uncover any routing misconfiguration and routing path failures. If a particular host is unreachable, you can use traceroute to see what path the packet follows to the remote host and where possible failures might occur.

The traceroute command also displays the round trip time for each gateway along the path to the target host. This information can be useful for analyzing where traffic is slow between the two hosts.

ProcedureHow to Find Out the Route to a Remote Host

  1. Type the following to discover the route to a remote system:


    % traceroute destination-hostname
    

    You can run this form of the traceroute command from your user account.


Example 8–17 Using the traceroute Command to Show the Route to a Remote Host

The following output from the traceroute command shows the seven–hop path a packet follows from the local system nearhost to the remote system farhost. The output also shows the times for a packet to traverse each hop.


istanbul% traceroute farhost.faraway.com
	traceroute to farhost.faraway.com (172.16.64.39), 30 hops max, 40 byte packets
	 1  frbldg7c-86 (172.16.86.1)  1.516 ms  1.283 ms  1.362 ms
	 2  bldg1a-001 (172.16.1.211)  2.277 ms  1.773 ms  2.186 ms
	 3  bldg4-bldg1 (172.16.4.42)  1.978 ms  1.986 ms  13.996 ms
	 4  bldg6-bldg4 (172.16.4.49)  2.655 ms  3.042 ms  2.344 ms
	 5  ferbldg11a-001 (172.16.1.236)  2.636 ms  3.432 ms  3.830 ms
	 6  frbldg12b-153 (172.16.153.72)  3.452 ms  3.146 ms  2.962 ms
	 7  sanfrancisco (172.16.64.39)  3.430 ms  3.312 ms  3.451 ms

ProcedureHow to Trace All Routes

This procedure uses the -a option of the traceroute command to trace all routes.

  1. Type the following command on the local system:


    % traceroute -ahost-name
    

    You can run this form of the traceroute command from your user account.


Example 8–18 Tracing All Routes to a Dual-Stack Host

This example shows all possible routes to a dual-stack host.


% traceroute -a v6host.remote.com
traceroute: Warning: Multiple interfaces found; using 2::56:a0:a8 @ eri0:2
traceroute to v6host (2001:db8:4a3b::102:a00:fe79:19b0),30 hops max, 60 byte packets
 1  v6-rout86 (2001:db8:4a3b:56:a00:fe1f:59a1)  35.534 ms  56.998 ms * 
 2  2001:db8::255:0:c0a8:717  32.659 ms  39.444 ms *
 3  farhost.faraway.COM (2001:db8:4a3b::103:a00:fe9a:ce7b)  401.518 ms  7.143 ms *
 4  distant.remote.com (2001:db8:4a3b::100:a00:fe7c:cf35)  113.034 ms  7.949 ms *
 5  v6host (2001:db8:4a3b::102:a00:fe79:19b0)  66.111 ms *  36.965 ms

traceroute to v6host.remote.com  (192.168.10.75),30 hops max,40 byte packets
 1  v6-rout86 (172.16.86.1)  4.360 ms  3.452 ms  3.479 ms
 2  flrmpj17u.here.COM (172.16.17.131)  4.062 ms  3.848 ms  3.505 ms
 3  farhost.farway.com (10.0.0.23)  4.773 ms *  4.294 ms
 4  distant.remote.com (192.168.10.104)  5.128 ms  5.362 ms *
 5  v6host  (192.168.15.85)  7.298 ms  5.444 ms *