Next: , Previous: , Up: GNU Inetutils   [Contents][Index]

9 traceroute: Trace the route to a host

traceroute prints a trace of the route IP packets are travelling to a remote host.


traceroute [option…] host

9.1 Command line options

-f num

Set the initial hop distance to num, instead of the default 1. This immediately allows probing packets to sense routing properties closer to the target host, skipping routers close to the local host. Quicker analysis of problems known to lie at some routing distance is the outcome.

-g gates

Set intermediary hosts used in loose source routing. The argument gates is a list of gateways, using spaces, commata, or semicola as separators. These hosts must be traversed in the given order before the intended host receives any datagram. At most eight host names or addresses may be specified. Multiple uses of -g produce a concatenated list.


Use ICMP ECHO datagrams for probing the remote host.

-m num

Set the maximum time-to-live allowed for probing. In other words, stop probing when the hop distance is in excess of num. The default limit is 64.

-M method

Use method as carrier packets for traceroute operations. Supported choices are ‘icmp’ and ‘udp’, where ‘udp’ is the default type.

-p port

Set destination port of target to port. The default value is 33434.

-q num

Send a total of num probe packets per hop, defaulting to 3.


Attempt to resolve all addresses as hostnames.

-t num

Set type-of-service, TOS field, to num on transmitted packets.

-w num

Set timeout in seconds, within which a returning response packet is accepted as such. Default waiting time is three seconds.

9.2 Diagnostic tokens

During execution, traceroute sends three datagrams for each value for the TTL field, printing a diagnostic line of output for these. The TTL field is then steadily increased until the intended host responds, or some intermediary gateway returns a datagram to the effect that the target cannot be reached due to one reason or another.

Each line of output displays a sequence number, followed by diagnostic annotation. Any responding host has its address printed without repetition, together with a measured timing. In case there is no response within a time period of three seconds, an asterisque ‘*’ is printed.

When an intermediate router responds with an exceptional state, the time elapsed since emitting the original datagram is printed, followed by an additional short hand hint of the reason:


Fragmentation needed by gateway.


Host not reachable from gateway.


Network not reachable from gateway.


Protocol not usable at host, or within network.


Source routing failed at gateway.


Host or network not reachable for stated type of service, TOS.


Isolated host, not reachable.


Forbidden by remote administration.

Next: whois: User interface to WHOIS data bases., Previous: ping6: Packets to IPv6 network hosts, Up: GNU Inetutils   [Contents][Index]