Traceroute – Packet Path Analysis & Troubleshooting
1. What Is Traceroute?
Traceroute (called tracert on Windows) is a network diagnostic tool that maps the exact path packets take from a source device to a destination across a network, revealing every router (hop) along the way along with per-hop latency measurements.
Where ping/show ip route confirms whether a destination is reachable, traceroute shows where the path breaks, slows, or behaves unexpectedly — making it the essential next step in connectivity troubleshooting.
Your Laptop www.example.com
192.168.1.10 93.184.216.34
|
| TTL=1 --> Router1 (192.168.1.1) responds: ICMP Time Exceeded
|
| TTL=2 --> Router2 (203.0.113.1) responds: ICMP Time Exceeded
|
| TTL=3 --> Router3 (198.51.100.1) responds: ICMP Time Exceeded
|
| TTL=4 --> 93.184.216.34 responds: ICMP Echo Reply (destination reached!)
Related pages: ipconfig / ifconfig | show ip route | show ip interface brief | show interfaces | Default Routes | ACL Overview | Troubleshooting Methodology
2. How Traceroute Works — TTL-Based Hop Discovery
Traceroute exploits the TTL (Time to Live) field in the IP packet header. Every router that forwards a packet decrements the TTL by 1. When TTL reaches 0, the router drops the packet and sends an ICMP Time Exceeded message back to the source — revealing its IP address.
Traceroute sends a series of probes with incrementally increasing TTL values:
| Probe | TTL Sent | Who Drops It? | Response Received |
|---|---|---|---|
| 1st probe | TTL = 1 | Router 1 (1st hop) | ICMP Time Exceeded from Router 1's IP |
| 2nd probe | TTL = 2 | Router 2 (2nd hop) | ICMP Time Exceeded from Router 2's IP |
| 3rd probe | TTL = 3 | Router 3 (3rd hop) | ICMP Time Exceeded from Router 3's IP |
| Final probe | TTL = N | Destination host | ICMP Echo Reply or Port Unreachable (destination) |
Each hop is probed with 3 packets by default, producing 3 round-trip time (RTT) measurements that reveal consistency of latency at that hop. Traceroute continues until it reaches the destination or the maximum hop limit (default 30).
3. Traceroute Command Syntax
| Platform | Command | Default Protocol | Key Options |
|---|---|---|---|
| Windows | tracert [destination] |
ICMP Echo Request | -h <max_hops>, -w <timeout_ms>, -d (no DNS resolution) |
| Linux / macOS | traceroute [destination] |
UDP (ports 33434+) | -I (ICMP), -T (TCP), -p <port>, -q <probes>, -m <max_hops>, -n (no DNS) |
| Cisco IOS | traceroute [destination] |
UDP | Extended mode for protocol selection, source interface, timeout |
Common examples:
tracert www.google.com # Windows — basic
tracert -h 15 -d 8.8.8.8 # Windows — max 15 hops, no DNS
traceroute www.google.com # Linux/macOS — basic
traceroute -I www.google.com # Linux — use ICMP instead of UDP
sudo traceroute -T -p 443 www.example.com # Linux — TCP to port 443 (HTTPS)
traceroute -n -m 20 8.8.8.8 # Linux — numeric IPs, max 20 hops
4. Interpreting Traceroute Output
Tracing route to www.google.com [142.250.72.196] over a maximum of 30 hops:
1 1 ms 1 ms 1 ms 192.168.1.1 <-- Default gateway (your router)
2 10 ms 11 ms 10 ms 203.0.113.1 <-- ISP edge router
3 24 ms 24 ms 25 ms 198.51.100.17 <-- ISP core
4 35 ms 34 ms 36 ms 142.250.72.196 <-- Destination reached
Trace complete.
| Column | Meaning | What to Look For |
|---|---|---|
| Hop number | Sequence of routers traversed, starting at 1 | Count total hops — more hops means more latency accumulation |
| 3× RTT values (ms) | Round-trip time for each of the 3 probe packets | Consistent values = stable; variable = jitter or load-balancing; high = congestion |
| IP address / Hostname | Identity of the router at that hop | Private IPs indicate internal hops; public IPs show ISP/internet path |
| * * * | No response received within the timeout period | Firewall blocking ICMP/UDP, router rate-limiting ICMP, or truly unreachable hop |
5. Reading Traceroute Scenarios
Scenario A — All Hops Reachable (Healthy Path)
1 1 ms 1 ms 1 ms 192.168.1.1
2 10 ms 11 ms 10 ms 203.0.113.1
3 25 ms 23 ms 25 ms 198.51.100.1
4 34 ms 34 ms 33 ms 93.184.216.34
Scenario B — Path Breaks at a Specific Hop
1 1 ms 1 ms 1 ms 192.168.1.1
2 11 ms 10 ms 10 ms 203.0.113.1
3 24 ms 25 ms 25 ms 198.51.100.1
4 * * * Request timed out.
5 * * * Request timed out.
Scenario C — High Latency at a Single Hop
1 1 ms 1 ms 1 ms 192.168.1.1
2 10 ms 11 ms 10 ms 203.0.113.1
3 250 ms 300 ms 200 ms 198.51.100.1 <-- Spike!
4 32 ms 35 ms 33 ms 93.184.216.34
Scenario D — Asymmetric Routing
Forward (A→B): 192.168.10.1 → 172.16.1.1 → 203.0.113.1 → 10.100.1.2
Reverse (B→A): 10.100.1.2 → 198.51.100.2 → 172.16.1.1 → 192.168.10.1
6. Platform Differences
| Feature | Windows (tracert) | Linux/macOS (traceroute) |
|---|---|---|
| Default protocol | ICMP Echo Request | UDP (ports 33434+) |
| TCP option | Not available natively | -T flag (requires root/sudo) |
| ICMP option | Default | -I flag |
| Output style | Simplified — shows ms and hostname | More flexible — AS numbers, packet sizes available |
| Disable DNS | -d | -n |
| Max hops | -h | -m |
7. Advanced: TCP Traceroute
When ICMP and UDP are blocked by firewalls, TCP traceroute simulates real application traffic, making it far more likely to traverse restrictive firewalls:
sudo traceroute -T -p 443 www.example.com # TCP to HTTPS port
sudo traceroute -T -p 80 www.example.com # TCP to HTTP port
sudo traceroute -T -p 22 192.168.1.1 # TCP to SSH port
This sends TCP SYN packets to the specified port with incrementing TTL — the same way your browser would connect, so corporate firewalls that permit web traffic will pass it.
8. Limitations of Traceroute
| Limitation | Impact | Workaround |
|---|---|---|
| ICMP/UDP may be blocked by firewalls | False asterisks, path appears broken when it isn't | Use TCP traceroute (-T on Linux) |
| Shows only forward path | Asymmetric routing hides return path issues | Run traceroute from both ends |
| Routers may rate-limit ICMP TTL responses | High latency at a hop that doesn't affect actual traffic | Check if latency carries forward to later hops |
| Load balancing may show different hops per probe | Inconsistent IP addresses across the 3 probes per hop | Use Paris Traceroute for consistent multipath tracing |
| Reveals internal network topology | Private IP addresses of internal devices exposed | Block ICMP TTL responses on internal routers in secure environments |
9. Troubleshooting Workflow with Traceroute
- Run
pingto the destination first — establishes whether the endpoint is reachable at all - Run
tracerouteto find the last responding hop before failure begins - Check the routing table on that device — is there a route to the destination?
- If ICMP traceroute shows asterisks but ping works, try TCP traceroute (
-T) - Check ACLs and firewall rules on the last responding device
- If path is looping (same hops repeating), check routing for route loops
Run
traceroute 8.8.8.8 (Linux) or tracert 8.8.8.8 (Windows). Count the hops. Find where the path transitions from your ISP to Google's network. Then try sudo traceroute -T -p 443 www.google.com and compare — does the path look different?
10. Summary
- Traceroute uses incrementing TTL values to elicit ICMP Time Exceeded messages from each hop along the path
- Windows uses tracert (ICMP by default); Linux/macOS uses traceroute (UDP by default)
- * * * means no response — could be a firewall, rate-limiting, or a truly unresponsive hop; does not always mean the path is broken
- High latency at a single hop that doesn't carry forward is usually not a real problem
- Use TCP traceroute (
-T) when ICMP/UDP is filtered by firewalls - Asymmetric routing is normal — run traceroute from both ends for the full picture