Marcio Cunha

High network latency? How to trace hops with traceroute

Learn how to trace network hops and identify latency bottlenecks or packet loss using the native diagnostic tool traceroute step by step.

Marcio Cunha•3 min
Also available in:PortuguêsEspañol
Summary
  • The traceroute command reveals the exact path that data travels between origin and destination.
  • The TTL control mechanism prevents lost packets from circulating infinitely across the internet.
  • High response times at a specific hop point to local bottlenecks or router overload.
  • Packet loss at the very final destination usually points to issues on the target server.
  • Modern utilities complement traditional diagnostics by assessing jitter and oscillation.

What is traceroute and how does it map your connection

When a webpage takes too long to load or a video call freezes, the issue is rarely limited to your computer or living room router. In practice, the internet consists of thousands of interconnected paths, and data must jump from one router to another until it reaches its final destination. This is precisely where traceroute comes in, a native utility present in almost all operating systems designed to map each of these stops along the way.

Whenever you send data across a network, it is broken down into small packets. The traceroute command fires these packets intelligently, revealing the IP and hostname of each intermediate router, technically known as a hop. If you want to understand your infrastructure's behavior before diving into deeper investigations, it is worth checking out our article on how to diagnose packet loss and high latency with mtr, which expands these basic concepts into continuous analysis.

How TTL control works across network hops

To understand the magic behind traceroute, we need to discuss a fundamental concept called TTL (Time to Live). In practice, the TTL is a number embedded in every data packet that decreases by one unit each time the packet passes through a router. When this number reaches zero, the current router discards the packet and sends a warning message back to the originating computer.

Traceroute takes advantage of this network protocol rule to map the path. It starts by sending packets with a TTL equal to 1, which causes the first router to respond. Then, it repeats the process sending packets with a TTL of 2, making the second router respond, and so on. This intelligent mechanism allows recording the round-trip time, known as latency, for each specific hop along the route.

Practical procedure to run traceroute in the terminal

If you need to investigate slowness right now, the procedure is quite straightforward and requires no complex software installation. Open your operating system terminal and run the basic command pointing to a destination address, such as a web server or domain of your choice.

To execute the initial diagnostic on your computer, follow the steps below in the terminal:

  1. Open your operating system's command terminal, whether it is Command Prompt on Windows or Terminal on Linux and macOS.
  2. Type the base command followed by the address you want to test, adjusting according to your system, such as
    traceroute 8.8.8.8
    for Unix-based systems or
    tracert 8.8.8.8
    if you are using Windows.
  3. Press Enter and wait a few seconds while the tool sends the packet sequence and displays the response time list for each intermediate hop on the screen.

How to interpret response times and identify bottlenecks

Once the command finishes running, you will see a numeric listing containing lines with three times in milliseconds and an IP address. In practice, these three numbers represent the time it took for the packet to go and return across three distinct attempts sent to the same hop. Minor variations are normal, but hops with excessively high values clearly indicate where the bottleneck is occurring.

Another common scenario is the famous asterisks (* * *), which appear when an intermediate router is configured to ignore diagnostic messages for security reasons. This does not necessarily mean there is a failure there. The real trouble happens when a hop shows high latency or total packet loss and all subsequent hops inherit that delay, evidencing a genuine traffic failure. To complement this implementation in production environments, see our related technical analyses on How to test optocouplers on board with a multimeter and How to extract text from scanned PDF with OCR in Python.

Final considerations on route diagnostics

Route tracking with traceroute is an essential first step for any IT professional or enthusiast looking to isolate connectivity failures without guesswork. Understanding packet behavior and the role of each hop turns a mysterious slowness issue into a precise diagnosis, enabling you to demand assertive solutions from your internet service provider or adjust internal infrastructure with much more confidence.