[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now



Posted on 2002-04-17
Medium Priority
Last Modified: 2013-12-27
what are the switches for the traceroute command
Question by:elliot4
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 14

Accepted Solution

chris_calabrese earned 200 total points
ID: 6948754
From http://docs.sun.com/ab2/coll.40.6/REFMAN1M/@Ab2PageView/281012?DwebQuery=traceroute&oqt=traceroute&Ab2Lang=C&Ab2Enc=iso-8859-1

traceroute [-adFIlnSvx] [-A addr_family] [-c traffic_class] [-f first_hop] [ -g gateway [ -g gateway...]| -r] [-i iface] [-L flow_label] [-m max_hop] [-P pause_sec] [-p port] [-Q max_timeout] [-q nqueries] [-s src_addr] [-t tos] [-w wait_time] host [packetlen]


-A addr_family

    Specify the address family of the target host. addr_family can be either inet or inet6. Address family determines which protocol to use. For an argument of inet, IPv4 is used. For inet6, IPv6 is used.

    By default, if the name of a host is provided, not the literal IP address, and a valid IPv6 address exists in the name service database, traceroute will use this address. Otherwise, if the name service database contains an IPv4 address, it will try the IPv4 address.

    Specify the address family inet or inet6 to override the default behavior. If the argument specified is inet, traceroute will use the IPv4 address associated with the hostname. If none exists, traceroute will state that the host is unknown and exit. It will not try to determine if an IPv6 address exists in the name service database.

    If the specified argument is inet6, traceroute will use the IPv6 address that is associated with the hostname. If none exists, traceroute will state that the host is unknown and exit.

    Probe all of the addresses of a multi-homed destination. The output looks like traceroute has been run once for each IP address of the destination. If this option is used together with -A, traceroute probes only the addresses that are of the specified address family. While probing one of the addresses of the destination, user can skip to the next address by sending a SIGINT, or exit traceroute by sending a SIGQUIT signal. See signal(3HEAD)
-c traffic_class

    Specify the traffic class of probe packets. 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 value of traffic_class set in the probe packet. This option is valid only on IPv6.

    Set the SO_DEBUG socket option.

    Set the "don't fragment" bit. This option is valid only on IPv4.
-f first_hop

    Set the starting ttl ( hop limit) value to first_hop, to override the default value 1. traceroute skips processing for those intermediate gateways which are less than first_hop hops away.
-g gateway

    Specify a loose source route gateway. The user can specify more than one gateway by using -g for each gateway. The maximum number of gateways is 8 for IPv4 and 127 for IPv6. Note that some factors such as the link MTU can further limit the number of gateways for IPv6. This option cannot be used with the -r option.

    Use ICMP (ICMP6) ECHO instead of UDP datagrams.
-i iface

    For IPv4, this option specifies a network interface to obtain the source IP address. This is normally only useful on a multi-homed host. The -s option is also another way to do this. For IPv6, it specifies the network interface on which probe packets are transmitted. The argument can be either an interface index, for example, 1, 2, or an interface name, for example, le0, hme0.
-L flow_label

    Specify the flow label of probe packets. The value must be an integer in the range from 0 to 1048575. This option is valid only on IPv6.

    Print the value of the ttl (hop limit) field in each packet received.
-m max_hop

    Set the maximum ttl (hop limit) 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.
-P pause_sec

    Specify a delay, in seconds, to pause between probe packets. This may be necessary if the final destination does not accept undeliverable packets in bursts. By default, traceroute sends the next probe as soon as it has received a reply. Note that pause_sec is a real number.
-p port

    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 (ICMP6) 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.
-Q max_timeout

    Stop probing this hop after max_timeout consecutive timeouts are detected. The default value is 5. Useful in combination with the -q option if you have specified a large nqueries probe count.
-q nqueries

    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). You cannot use this option if the -g option is used.
-s src_addr

    Use the following address, which usually is given as a literal 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. For IPv4, when used together with the -i option, the given IP address should be configured on the specified interface. Otherwise, an error will be returned. In the case of IPv6, the interface name and the source address do not have to match.
-t tos

    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. This option is valid only on IPv4.

    Verbose output. For each hop, the size and the destination of the response packets is displayed. Also ICMP (ICMP6) packets received other than TIME_EXCEEDED and UNREACHABLE are listed as well.
-w waittime

    Set the time, in seconds, to wait for a response to a probe. The default is 5 seconds.

    Prevent traceroute from calculating checksums. Note that checksums are usually required for the last hop when using ICMP ECHO probes. This option is valid only on IPv4. See the -I option.


The following operands are supported:


    The network host.
LVL 21

Expert Comment

ID: 8052741
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by chris_calabrese

Please leave any comments here within the next 7 days


Cleanup Volunteer

Expert Comment

ID: 8099635
per recommendation

Community Support Moderator @Experts Exchange

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question