traceroute - display the route packets trace to network host
traceroute [-46dFITUnrAV] [-f first_ttl] [-g gate,...]
[-i device] [-m max_ttl] [-p port] [-s src_addr]
[-q nqueries] [-N squeries] [-t tos]
[-l flow_label] [-w waittime] [-z sendwait]
host [packetSize]
traceroute6 [options]
tracert [options]
tcptraceroute [options]
Displays the route packets might take to a host.
TTL is expressed in transfers from each host or gateway aka hops.
traceroute6 is the same as traceroute -6
tracert is the same as traceroute -I
tcptraceroute is the same as traceroute -T -p 80
Varying the size of the packet sent to that host (default 40),
in conjunction with -F can obtain information about the MTU of individual network hops. (size not used with TCP ).
-f first_ttl | TTL to start. Default 1. | ||||||||||||||||||||||||||||||||||||||||
-m max_ttl |
If there is no response within a timeout, a "*" is displayed.
To avoid having the destination host process the UDP packets, the destination port is set to an unlikely value (see -p ).
There is no problem for ICMP or TCP tracerouting (for TCP sessions are closed immediately after connect).
!H, !N, or
!P host, network or protocol unreachable
!S source route failed
!F fragmentation needed
!X communication administratively prohibited
!V host precedence violation
!C precedence cutoff in effect
!nnn ICMP unreachable code as in RFC1812
tracepath [-nc] destination[/port]
Uses UDP port or random port, similar to traceroute,
-c use the return address instead of the reply type (connection refused) to determine when to stop.
tracepath6 is good replacement for traceroute6 and classic example of application of Linux error queues.
Some commercial IP routers do not return enough information in icmp error messages.
Uses Van Jacobson's algorithm, sweeping a range of UDP ports to maintain trace history.
# tracepath6 3ffe:2400:0:109::2
1?: [LOCALHOST] pmtu 1500
1: dust.inr.ac.ru 0.411ms
2: dust.inr.ac.ru asymm 1 0.390ms pmtu 1480
2: 3ffe:2400:0:109::2 463.514ms reached
Resume: pmtu 1480 hops 2 back 2
LOCALHOST, if the packet was not sent to the network.
async
the third line shows asymmetry of 1, it is because the first probe with TTL of 2 was rejected at the first hop due to Path MTU Discovery.
|
The default packet size of 40 bytes may be increased by specifying size after the destination.
Other options are:
Understanding tracerouteIt is important to understand that the list of hops displayed is only one of the possible paths that packets may take.Routers (dedicated or on general purpose hosts) frequently have more than 2 interfaces. Packets received on one interface may be routed to the second interface or the traffic may better suits routing to the third interface. It would not be unusual for all packets to use the same route during a short time period. It would not be unusual for packets at a later time to use a different route.
Default settings start with a ttl of 1 and increase by 1 until ICMP "port unreachable" is received (i.e target host replied or hit a max)
(defaults to net.inet.ip.ttl hops & can be changed with A sample use and output might be:
gateways at 12, 14, 15, 16 & 17 hops away, either don't send
ICMP "time exceeded" messages or send them with a ttl too small to get back to the traceroute servergateway 12 is silent which .
There are 12 "gateways" (13 is the final destination) and
exactly the last half of them are "missing". What could be happening is that rip is using the ttl from our arriving datagram as the ttl in its ICMP reply. The reply will time out on the return path (with no notice sent to anyone since ICMP's aren't sent for ICMP's) until we probe with a ttl that's at least twice the path length. I.e., rip is really only 7 hops away. A reply that returns with a ttl of 1 is a clue this problem exists. traceroute displays a ! after the time if the ttl is <= 1.
Errors:
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, it is unwise to use
traceroute during normal operations or from automated scripts.
AUTHOR
Implemented by Van Jacobson from a suggestion by Steve Deering. Debugged
by a cast of thousands with particularly cogent suggestions or fixes from
C. Philip Wood, Tim Seaver and Ken Adelman.
SEE ALSO
netstat(1), ping(8) Internet Pluse inter connect
BUGS |