NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXAMPLES | EXIT STATUS | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO | WARNINGS
The Internet is a large and complex aggregation of network hardware, connected together by gateways. Tracking the route a packet follows can be difficult. The utility traceroute traces the route that an IP packet follows to another internet host. In the Trusted
Solaris environment, traceroute must be run with the net_rawaccess
privilege.
traceroute utilizes the IP protocol ttl (time to live) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path, and a PORT_UNREACHABLE(or ECHO_REPLY if -I is used) response from the destination host. It starts by sending probes with a ttl of 1 and increases by 1 until it either gets to the host, or it hits the maximum ttl. The default maximum ttl is 30 hops, but this can be set by the -m option.
Three probes are sent at each ttl setting, and a line is printed showing the ttl, the hostname and the address of the gateway, and the rtt (round trip time) of each probe. The number of probes may be specifically set using the -q option. If the probe answers come from different gateways, the hostname and the address of each responding system will be printed. If there is no response within a 5 second timeout interval, a "*" is printed for that probe. The -w option may be used to set the timeout interval. Other possible annotations that may appear after the time are:
the ttl value in the received packet is <= 1.
host unreachable.
network unreachable.
protocol unreachable.
source route failed. This should never occur. If this is seen, the associated gateway is broken.
fragmentation needed. This should never occur. If this is seen, the associated gateway is broken.
communication administratively prohibited.
ICMP unreachable code N.
The destination host is not supposed to process the UDP probe packets, so the destination port default is set to an unlikely value. However, if some application on the destination is using that value, the value of port can be changed with the -p option.
The only mandatory parameter is the destination host name or IP number. The default probe datagram length is 40 bytes, but this may be increased by specifying a packet length (in bytes) after the destination host name.
All numeric arguments to traceroute can be specified in either decimal or hexadecimal notation. For example, packetlen can be specified either as 256 or 0x100.
Set the SO_DEBUG socket option.
Set the "don't fragment" bit.
Set the starting ttl value to first_ttl, to override the default value 1. traceroute skips processing for those intermediate gateways which are less than first_ttl hops away.
Specify a loose source route gateway. The user can specify more than one gateway by using -g for each gateway. The maximum that can be set is 8.
istanbul% traceroute -g cairo -g paris -g london sanfrancisco |
Use ICMP ECHO instead of UDP datagrams.
Specify a network interface to obtain the source IP address for outgoing probe packets. This is normally only useful on a multi-homed host. The -s option is also another way to do this. Note that this option does not provide a way to specify the interface on which the probe packets are sent.
Set the maximum ttl used in outgoing probe packets. The default is 30 hops, which is the same default used for TCP connections.
Print hop addresses numerically rather than symbolically and numerically. This saves a nameserver address-to-name lookup for each gateway found on the path.
Set the base UDP port number used in probes.The default is 33434. traceroute hopes that nothing is listening on UDP ports (base+(nhops-1)*nqueries) to (base+(nhops*nqueries)-1)at the destination host, so that an ICMP PORT_UNREACHABLE message will be returned to terminate the route tracing. If something is listening on a port in the default range, this option can be used to select an unused port range.nhops is defined as the number of hops between the source and the destination.
Set the desired number of probe queries. The default is 3.
Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to send probes to a local host through an interface that has been dropped by the router deamon. See in.routed(1M).
Use the following address, which usually is given as an IP address, not a hostname, as the source address in outgoing probe packets. On multi-homed hosts, those with more than one IP address, this option can be used to force the source address to be something other than the IP address traceroute picks by default. If the IP address is not one of this machine's interface addresses, an error is returned and nothing is sent. When used together with the -i option, the given IP address should be configured on the specified interface. Otherwise, an error will be returned.
Set the tos(type-of-service) in probe packets to the specified value. The default is zero. The value must be an integer in the range from 0 to 255. Gateways along the path may route the probe packet differently depending upon the tos value set in the probe packet.
Verbose output. For each hop, the size and the destination of the response packets is displayed. Also ICMP packets received other than TIME_EXCEEDED and UNREACHABLE are listed as well.
Set the time, in seconds, to wait for a response to a probe. The default is five (5) seconds.
Prevent traceroute from calculating checksums. Note that checksums are usually required for the last hop when using ICMP ECHO probes. See the -I option.
The following is a sample traceroute run and its output. It shows the 7-hop path that a packet would follow from the host istanbul to the host sanfrancisco.
istanbul% traceroute sanfrancisco traceroute: Warning: Multiple interfaces found; using 172.31.86.247 @ le0 traceroute to sanfrancisco (172.29.64.39), 30 hops max, 40 byte packets 1 frbldg7c-86 (172.31.86.1) 1.516 ms 1.283 ms 1.362 ms 2 bldg1a-001 (172.31.1.211) 2.277 ms 1.773 ms 2.186 ms 3 bldg4-bldg1 (172.30.4.42) 1.978 ms 1.986 ms 13.996 ms 4 bldg6-bldg4 (172.30.4.49) 2.655 ms 3.042 ms 2.344 ms 5 ferbldg11a-001 (172.29.1.236) 2.636 ms 3.432 ms 3.830 ms 6 frbldg12b-153 (172.29.153.72) 3.452 ms 3.146 ms 2.962 ms 7 sanfrancisco (172.29.64.39) 3.430 ms 3.312 ms 3.451 ms |
The following example shows the path of a packet that goes from istanbul to sanfrancisco through the hosts cairo and paris, as specified by the -g option. The -I option makes traceroute send ICMP ECHO probes to the host sanfrancisco. The -i option sets the source address to the IP address configured on the interface qe0.
istanbul% traceroute -g cairo -g paris -i qe0 -q 1 -I sanfrancisco traceroute to sanfrancisco (172.29.64.39), 30 hops max, 56 byte packets 1 frbldg7c-86 (172.31.86.1) 2.012 ms 2 flrbldg7u (172.31.17.131) 4.960 ms 3 cairo (192.168.163.175) 4.894 ms 4 flrbldg7u (172.31.17.131) 3.475 ms 5 frbldg7c-017 (172.31.17.83) 4.126 ms 6 paris (172.31.86.31) 4.086 ms 7 frbldg7b-82 (172.31.82.1) 6.454 ms 8 bldg1a-001 (172.31.1.211) 6.541 ms 9 bldg6-bldg4 (172.30.4.49) 6.518 ms 10 ferbldg11a-001 (172.29.1.236) 9.108 ms 11 frbldg12b-153 (172.29.153.72) 9.634 ms 12 sanfrancisco (172.29.64.39) 14.631 ms |
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability | SUNWcsu |
The traceroute utility must be run with the net_rawaccess
privilege.
An administrative role must run this utility. By default, traceroute is in the Network Management profile.
This utility 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, it is unwise to use traceroute during normal operations or from automated scripts.
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXAMPLES | EXIT STATUS | ATTRIBUTES | SUMMARY OF TRUSTED SOLARIS CHANGES | SEE ALSO | WARNINGS