How to use traceroute command.

What is traceroute command?

The traceroute command in Linux is a network diagnostic tool used to track the route and measure the round-trip time (RTT) of packets between your computer and a destination IP address or hostname. It helps in identifying the path that network packets take to reach a specific destination.

Syntax:

traceroute [options]  host_Address [pathlength]

Options:

  • -4 Option: Use ip version 4 i.e. use IPv4

    Syntax:

    $ traceroute -4 nexonhost.com

-6 Option: Use ip version 6 i.e. use IPv6

Syntax:

$ traceroute -6 nexonhost.com

-F Option: Do not fragment packet.

Syntax:

$ traceroute -F nexonhost.com

-f first_ttl Option: Start from the first_ttl hop (instead from 1).

Syntax:

$ traceroute -f 10 nexonhost.com

-g gate Option: Route the packet through gate.

Syntax:

$ traceroute -g nexonhost

-m max_ttl Option: Set the max number of hops for the packet to reach the destination.Default value is 30.

Syntax:

$traceroute  -m 5 nexonhost.com

-n Option: Do not resolve IP addresses to their domain names.

Syntax:

$traceroute -n nexonhost.com

-p port Option: Set the destination port to use. Default is 33434.

Syntax:

$traceroute  -p 20292 nexonhost.com

-q nqueries Option: Set the number of probes per each hop. Default is 3.

Syntax:

$traceroute -q 1 nexonhost.com

packetlen Option: The full packet length. Default len is 60 byte packets.

Syntax:

$traceroute  nexonhost.com 100

–help: Display help messages and exit.

Syntax:

$traceroute --help

Conclusion

In the ever-connected digital ecosystem, network problems are inevitable. Traceroute serves as a guiding light, offering transparency into the intricate paths that data traverses. Whether it’s diagnosing latency issues, pinpointing packet loss, or uncovering routing anomalies, this tool empowers network professionals to take proactive measures, optimize performance, and ensure seamless connectivity. Traceroute is not just a diagnostic tool; it’s a window into the heart of the internet, allowing us to see the journey that our data undertakes on its way to its destination.