Solved

traceroute

Posted on 2002-04-17
3
471 Views
Last Modified: 2013-12-27
what are the switches for the traceroute command
0
Comment
Question by:elliot4
3 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 50 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

 SYNOPSIS
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]

OPTIONS

-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.
-a

    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.
-d

    Set the SO_DEBUG socket option.
-F

    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.
-I

    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.
-l

    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.
-n

    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.
-r

    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.
-v

    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.
-x

    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.

OPERANDS

The following operands are supported:

host

    The network host.
0
 
LVL 20

Expert Comment

by:tfewster
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

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8099635
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now