TRACEROUTE

What is Traceroute?

Traceroute is a network utility used to trace the path that packets take from your computer to a target server/host. It shows each hop (router) along the way and how long each step takes.

👉 In simple terms:

  • Shows how data travels through the Internet to reach a destination.

  • Helps find where a connection slows down or breaks.


🔑 Why is Traceroute Important?

Purpose
Why it matters

Diagnose network problems

Find where connection drops or slows.

Measure latency per hop

Identify slow network devices or congestion.

Understand network route

See how data travels to a destination.

Check ISP and intermediary routers

Identify which ISPs/routers your data passes through.


⚙️ How does Traceroute Work?

  1. Sends packets with increasing TTL (Time-To-Live) values.

  2. Each router (hop) along the path decrements TTL by 1.

  3. When TTL reaches 0, router sends ICMP "Time Exceeded" reply.

  4. By analyzing replies, traceroute maps the path to the destination.

📊 Example:

  • TTL = 1 → Stop at 1st router, get reply.

  • TTL = 2 → Stop at 2nd router, get reply.

  • Continue until reaching target server.


💻 Traceroute Commands:

System
Command Example

Windows

tracert google.com

Linux/Mac

traceroute google.com


📜 Example Output (Windows - tracert):

nginxCopyEditTracing route to google.com [142.250.190.78]
over a maximum of 30 hops:

  1    2 ms     1 ms     2 ms  192.168.1.1
  2    5 ms     3 ms     4 ms  10.0.0.1
  3   20 ms    15 ms    17 ms  isp-gateway.net [203.0.113.1]
  4   35 ms    30 ms    40 ms  142.250.190.78

Trace complete.

📜 Example Output (Linux/Mac - traceroute):

nginxCopyEdittraceroute to google.com (142.250.190.78), 30 hops max
 1  192.168.1.1 (192.168.1.1)  2.123 ms  1.987 ms  2.055 ms
 2  10.0.0.1 (10.0.0.1)  5.567 ms  5.432 ms  5.678 ms
 3  isp-gateway.net (203.0.113.1)  15.345 ms  14.876 ms  15.654 ms
 4  142.250.190.78 (142.250.190.78)  30.987 ms  31.345 ms  30.543 ms

🧠 Key Terms in Output:

Term
Meaning

Hop Number

Order of devices in the route.

IP Address

Address of the router or device.

Hostname

(Optional) Domain name of the router.

Time (ms)

Round-trip time to that router (latency).

* (Asterisk)

Timeout / No reply received from that hop.


🛠️ Traceroute Common Options:

Option
Description
Example

-d (Windows)

Do not resolve addresses to hostnames.

tracert -d google.com

-h [max hops]

Set max number of hops.

tracert -h 20 google.com

-w [timeout] (ms)

Set timeout for each reply.

tracert -w 500 google.com

-n (Linux/Mac)

Don't resolve names (show IP only).

traceroute -n google.com

-m [max hops]

Set max hops (Linux/Mac).

traceroute -m 20 google.com

-q [queries]

Number of queries per hop (Linux/Mac).

traceroute -q 5 google.com


🚦 How to Interpret Traceroute Results:

Scenario
Meaning

Normal response with times

Hop is reachable; latency measured.

* * * (3 stars)

No response; hop is dropping/ignoring packets.

High response times

Possible congestion or slow device.

Sudden jump in time between hops

Bottleneck or delay introduced.

Stops before reaching target

Possible routing issue or firewall blocking.


📌 Use Cases of Traceroute:

  1. Identify network slowdowns:

bashCopyEdittracert youtube.com
  1. Find broken paths (packet drop):

bashCopyEdittraceroute facebook.com
  1. Check international routing:

bashCopyEdittraceroute cnn.com

🔐 Traceroute vs Ping:

Feature
Ping
Traceroute

Purpose

Test if host is reachable.

Trace the route packets take to a host.

Shows hops?

❌ No

✅ Yes

Shows delay per hop?

❌ No

✅ Yes

Packet type

ICMP Echo Request/Reply

ICMP (Windows), UDP/ICMP (Linux/Mac)


Summary:

Feature
Description

Purpose

Trace path of packets to destination.

Diagnoses

Network delays, unreachable devices.

Command (Windows)

tracert [host]

Command (Linux/Mac)

traceroute [host]

Common Issues Found

Slow hops, dropped packets, broken routes.

Last updated