DEV Community

Sunny Bhambhani
Sunny Bhambhani

Posted on • Edited on

1 1 1 1 1

traceroute

traceroute

traceroute is a tool to trace the path of an IP packet as it traverses routers, and it is a great utility for checking the route from a source to a destination. The traceroute command is one of the simplest yet most effective ways to troubleshoot network problems.

NOTE:

  • Different platforms offer traceroute as a tool, such as TRACERT on Windows or TRACEROUTE on Linux and Mac.
  • Installation steps on both platforms are pretty simple, since we will be talking about Linux (Ubuntu). Below are the steps to get this utility installed.
  • If you are on RHEL family, you can get this installed by yum.
$ apt-get update -y 
$ apt get install traceroute -y
Enter fullscreen mode Exit fullscreen mode

Here are some examples of how to use the traceroute command in Linux:

To perform a traceroute to a host:

$ traceroute google.com
Enter fullscreen mode Exit fullscreen mode

To perform a traceroute to a host with the IP address:

$ traceroute 142.250.77.78
Enter fullscreen mode Exit fullscreen mode

To perform a traceroute with a maximum of 10 hops:

$ traceroute -m 10 google.com
Enter fullscreen mode Exit fullscreen mode

To perform a traceroute with a maximum wait time of 2 seconds per hop:

$ traceroute -w 2 google.com
Enter fullscreen mode Exit fullscreen mode

To perform a traceroute with only one packet sent per hop:

$ traceroute -q 1 google.com
Enter fullscreen mode Exit fullscreen mode

Feel free to check its capabilities via man traceroute

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs