🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

traceroute Command

Intermediate Networking man(1)

Trace the route packets take to a network host

👁 11 views 📅 Updated: Mar 15, 2026
SYNTAX
traceroute [OPTION]... HOST

What Does traceroute Do?

traceroute traces the network path from your computer to a destination, showing each router (hop) along the way. It reveals the network route, identifies where delays occur, and helps diagnose routing problems.

traceroute works by sending packets with incrementally increasing TTL (Time To Live) values. Each router decrements the TTL and sends back a response when it reaches zero, revealing its address.

traceroute is essential for diagnosing network latency, routing issues, and identifying where packets are being dropped or delayed.

Options & Flags

OptionDescriptionExample
-n Show IP addresses only (no DNS lookup) traceroute -n example.com
-m Maximum hops traceroute -m 30 example.com
-w Wait time per probe traceroute -w 3 example.com
-I Use ICMP instead of UDP sudo traceroute -I example.com
-T Use TCP SYN sudo traceroute -T -p 443 example.com
-q Number of probes per hop traceroute -q 1 example.com

Practical Examples

#1 Trace route to host

Shows every router hop between you and the destination.
$ traceroute example.com
Output: 1 gateway (192.168.1.1) 1.234 ms\n2 isp-router (10.0.0.1) 5.678 ms\n3 backbone (172.16.0.1) 15.234 ms

#2 Numeric only

Shows IP addresses without DNS resolution (faster).
$ traceroute -n 8.8.8.8

#3 TCP traceroute

Uses TCP to trace — works when UDP is blocked by firewalls.
$ sudo traceroute -T -p 443 example.com

#4 Quick trace

One probe per hop, no DNS — fastest traceroute.
$ traceroute -q 1 -n example.com

#5 ICMP traceroute

Uses ICMP echo (like ping) — same protocol as Windows tracert.
$ sudo traceroute -I example.com

Tips & Best Practices

Use mtr instead: mtr combines traceroute and ping, providing continuous monitoring. It is more useful for diagnosing intermittent issues.
* * * means filtered: Asterisks mean the hop did not respond. Many routers block traceroute probes — this does not necessarily mean a problem.
UDP vs ICMP vs TCP: Default UDP may be blocked. Try -I (ICMP) or -T (TCP) if you see all asterisks. TCP on port 443 works through most firewalls.

Frequently Asked Questions

How do I trace the route to a server?
traceroute hostname shows each hop. Use -n for faster results (no DNS lookup).
What do asterisks * mean?
The router at that hop did not respond. It may be filtering traceroute probes. This is common and not always a problem.
What is the difference between traceroute and mtr?
traceroute runs once and exits. mtr runs continuously, showing real-time statistics for each hop — better for diagnosing intermittent issues.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →