Table of Contents

Linux Commands#network

traceroute - How to use traceroute command in Linux with examples




traceroute options

# traceroute --help

  -T  --tcp                   Use TCP SYN for tracerouting (default port is 80)
  -i device  --interface=device
                              Specify a network interface to operate with
  -m max_ttl  --max-hops=max_ttl
                              Set the max number of hops (max TTL to be
                              reached). Default is 30
  -n                          Do not resolve IP addresses to their domain names
  -p port  --port=port        Set the destination port to use. It is either
                              initial udp port value for "default" method
                              (incremented by each probe, default is 33434), or
                              initial seq for "icmp" (incremented as well,
                              default from 1), or some constant destination
                              port for other methods (with default of 80 for
                              "tcp", 53 for "udp", etc.)
  -w waittime  --wait=waittime
                              Set the number of seconds to wait for response to
                              a probe (default is 5.0). Non-integer (float
                              point) values allowed too
  -U  --udp                   Use UDP to particular port for tracerouting
                              (instead of increasing the port per each probe),
                              default port is 53


Exaple

traceroute -n 192.168.0.10         <- Do not resolve IP addresses to their domain names

traceroute -T -p 80 192.168.0.10   <- (-T = TCP)

traceroute -U -p 53 192.168.0.10   <- DNS (-U = UDP)


Linux Commands#network