The Internet is a large and complex aggregation of network
hardware, connected together by gateways. The traceroute command
tracks the route packets follow from gateway to gateway. The
command uses the IP protocol `time to live' field and attempts to
elicit an ICMP "time exceeded" response from each gateway along
the path to a particular host.
The only mandatory parameter is the destination host name or IP
number. The default probe datagram length is 38 bytes, but you
can increase this by specifying a packet size (in bytes) after
the destination host name. This is useful when the -f option is
given for MTU discovery along the route. You should start with
the maximum packet size for your own network interface (if the
given value is even bigger, traceroute attempts to select a more
appropriate value). If no packet size is given when using the -f
option, traceroute determines the initial MTU automatically.
To track the route of an IP packet, traceroute launches UDP probe
packets with a small ttl (time to live) and then listens for an
ICMP "time exceeded" reply from a gateway. Probes start with
a ttl of one and increase by one until either an ICMP "port
unreachable" is returned (indicating that the packet reached
the host) or the maximum number of hops is exceeded (the default
is 30 hops and can be changed with the -m option). At each ttl
setting, traceroute launches three probes (you can change the
number with the -q option) and prints a line showing the ttl,
address of the gateway, and round trip time of each probe. If the
probe answers come from different gateways, traceroute prints the
address of each responding system. If there is no response within
a 3 second timeout interval (which you can change with the -w
option), an asterisk (*) is printed for that probe.
To prevent the destination host from processing the UDP probe
packets, the destination port is set to an unlikely value. You
can change the destination port value with the -p option, if
necessary.
NOTE
This program is intended for use in network testing,
measurement and management. It should be used primarily
for manual fault isolation. Because of the load it could
impose on the network, do not use traceroute during normal
operations or from automated scripts.
1 – SPECIAL_ANNOTATIONS
Other possible annotations displayed after the time are:
!H Host is unreachable.
!N Network is unreachable.
!P Protocol is unreachable.
!F Fragmentation needed.
This indicator may show up if the -f command line option
is being used, and the associated gateway requires further
fragmentation. In case the desired new MTU size is known,
it is indicated.
!S Source route failed.
This should not occur under normal circumstances and the
associated gateway might be broken if you see one.
!T Host or network is unreachable for the given tos.
!U Destination is unreachable.
This indicator is printed for some of the new unreachable
subcodes as defined in RFC 1812.
!A Some routers fail to generate an ICMP "port unreachable"
message, but send an ICMP "time exceeded" message instead
if they are the target host. The indicator is printed if
this is detected.
!G Some routers erroneously generate ICMP "port unreachable"
instead of "time exceeded" if they are specified as loose
source route gateway hosts. The indicator is printed if
this is detected.
If all the probes result in an unreachable status,
traceroute stops sending probes and exits.
2 – TTL_INDICATION
(ttl=n!)
This indicates that the ttl value in the ICMP "time exceeded"
packet that we received was unexpected. We expected some initial
value, for example, the number of routers between our system and
another system. In other words, if the path from hop 5 to us is
the same as the path from us to hop 5, we expect to receive a ttl
value of 4.
There are several common initial values for ICMP ttls: 255,
60, 59, 30 and 29. 4.3 tahoe BSD and Cisco routers use 255,
Proteon routers use either 59 or 29 depending on software
release, several other implementations use 60 and 30. This
software uses an initial ttl of 64. The traceroute command
checks against all of these, making it hard to detect some small
routing asymmetries. If you want to see the ttl values in all the
packets, use the -l option.