Have you ever wondered what path your data takes when it travels from your computer to a website like Google or Facebook? Or why a specific website feels slow even though your internet connection is fast? The answer lies in the traceroute command.

Traceroute is a powerful network diagnostic tool that displays the route (path) and measures the transit delays of packets across an Internet Protocol (IP) network.

How Traceroute Works

The internet is a web of interconnected routers. When you visit a website, your request hops from one router to another until it reaches the destination server.

Traceroute works by sending a series of packets (usually ICMP Echo Requests or UDP packets) with gradually increasing Time-To-Live (TTL) values.

  1. TTL=1: The first router receives the packet, decrements the TTL to 0, discards the packet, and sends back an "ICMP Time Exceeded" message. This identifies the first hop.
  2. TTL=2: The packet passes the first router, reaches the second router, TTL becomes 0, and the second router replies. This identifies the second hop.
  3. Process continues: This repeats until the packet reaches the destination or the maximum number of hops is reached.

How to Run Traceroute

On Windows (Command Prompt)

Windows uses the command tracert.

  1. Press Win + R, type cmd, and press Enter.
  2. Type the following command and press Enter:
Command
tracert google.com
  1. Wait for the results to complete.

On macOS / Linux (Terminal)

Mac and Linux systems use the command traceroute.

  1. Open the Terminal app.
  2. Type the following command and press Enter:
Command
traceroute google.com

Interpreting the Results

A typical traceroute output looks like this:

Output
 1  192.168.1.1 (192.168.1.1)  2.543 ms  1.987 ms  2.123 ms
 2  10.20.30.1 (10.20.30.1)  12.345 ms  11.456 ms  12.789 ms
 3  nyc-core-router.isp.net (203.0.113.5)  25.678 ms  24.567 ms  26.789 ms
 ...
12  google.com (142.250.183.14)  45.123 ms  44.567 ms  45.789 ms
  • Hop Number (Column 1): The sequence of the router in the path.
  • Hostname/IP (Column 2): The address of the router. Seeing * usually means the router is configured to not reply to ICMP packets (firewall).
  • RTT (Columns 3-5): Round-Trip Time. The time it took for the packet to reach that router and return, measured in milliseconds.

Troubleshooting Tips

  • High Latency: If you see a sudden jump in RTT (e.g., from 20ms to 200ms) between hop 3 and 4, the issue likely lies with the router at hop 4 or the link between them.
  • Timeouts (): Occasional timeouts are normal. However, if the traceroute stops completely with for all subsequent hops, there might be a firewall blocking the path or a routing loop.

Alternative: Online Traceroute

If you don't want to use the command line, you can use our Online Traceroute Tool. It runs the command from our server, which is great for checking connectivity from an external perspective (outside your local network).

Traceroute is an essential skill for any aspiring network engineer or student. Mastering it gives you "X-ray vision" into network connectivity issues.