traceroute

traceroute is a network diagnostic tool used to track the route taken by IP packets from the source to the destination host. It provides detailed information about the routers and their network addresses that packets traverse to reach the destination. The traceroute command is used for troubleshooting network connectivity issues, identifying network congestion points, and analyzing network performance.

Basic Syntax

traceroute [options] host

Here, host can be an IP address or a domain name.

Commonly Used Options

  • -n: This prevents the hostname resolution of the routers and displays their IP addresses instead.
  • -m max_ttl: This sets the maximum number of hops before the traceroute is aborted.
  • -q nqueries: This sets the number of probes sent to each router.
  • -p port: This sets the destination port number used for the probe packets.
  • -w waittime: This sets the maximum wait time for a response from the router.
  • -I: This uses ICMP packets for the traceroute instead of UDP packets.

Useful Examples

  • traceroute google.com: This traces the route taken by IP packets to the Google server and displays the routers and their network addresses.
  • traceroute -n google.com: This displays the routers’ IP addresses instead of their hostnames.
  • traceroute -m 20 google.com: This sets the maximum number of hops to 20.
  • traceroute -q 3 google.com: This sends 3 probes to each router.
  • traceroute -p 80 google.com: This sets the destination port number to 80.
  • traceroute -w 2 google.com: This sets the maximum wait time for a response to 2 seconds.
  • traceroute -I google.com: This uses ICMP packets instead of UDP packets for the traceroute.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

  1. […] Once installed, let’s first allow TCP traffic over your SSH port so that you don’t get locked out of…

  2. […] have the option to choose between Password and SSH key selection. Learn more about SSH keys here. It’s recommended…