Sub topic 9
Reading traceroute output and locating a problem
This chapter assumes you know what an IP address, a default gateway, and a router are. It also assumes you can run ping and tracert or traceroute from a terminal, and that you know TTL (hop limit) decreases by one at each router. Here you learn to read each line of the output and to decide where a problem begins.
Anatomy of a traceroute line
Each line of output is one hop. A hop is one router that forwarded your probe. Here is a typical Windows tracert run:
tracert -d example.comTracing route to example.com [93.184.216.34]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 192.168.1.1
2 8 ms 7 ms 8 ms 10.20.0.1
3 9 ms 9 ms 10 ms 100.64.12.5
4 14 ms 13 ms 14 ms 203.0.113.9
5 * * * Request timed out.
6 31 ms 30 ms 32 ms 198.51.100.77
7 32 ms 31 ms 31 ms 93.184.216.34
Trace complete.The columns mean the following:
| Column | Meaning |
|---|---|
| Hop number | The TTL value that produced this line. Hop 1 is your default gateway. |
| Three times | Round-trip times for three separate probes sent with the same TTL. |
| Address | The source address of the ICMP Time Exceeded reply, which is the router's address on the interface that sent the reply. |
| `*` | No reply arrived within the timeout (about 4 seconds on Windows, 5 seconds by default on Linux). |
Linux and macOS traceroute prints the same information in a slightly different layout:
traceroute -n example.comtraceroute to example.com (93.184.216.34), 30 hops max, 60 byte packets
1 192.168.1.1 0.412 ms 0.388 ms 0.371 ms
2 10.20.0.1 7.912 ms 7.801 ms 8.115 ms
3 100.64.12.5 9.204 ms 9.188 ms 9.742 ms
4 203.0.113.9 14.031 ms 13.907 ms 14.220 ms
5 * * *
6 198.51.100.77 30.514 ms 30.388 ms 31.002 ms
7 93.184.216.34 31.775 ms 31.690 ms 31.702 msThe -d option on Windows and -n on Linux and macOS both skip reverse DNS lookups. Without them, each address is looked up by name, which slows the trace and adds names such as ae-1.core1.example.net. These names are often useful hints about location and provider, so use them when you want to know whose network you are in.
Why a hop can show more than one address
The three probes for one hop can take different paths. When a provider load-balances traffic across parallel links, you may see two or three addresses on one line:
4 203.0.113.9 14.031 ms 203.0.113.13 13.907 ms 203.0.113.9 14.220 msThis is normal. It tells you the path is not a single fixed chain of routers.
How the output is produced
A quick reminder of the mechanism helps explain every pattern below. The tool sends probes with TTL 1, then 2, then 3, and so on. The router that sees TTL reach zero discards the probe and sends back an ICMP Time Exceeded message. The final destination answers differently: ICMP Echo Reply for ICMP probes, or ICMP Port Unreachable for the UDP probes that Linux and macOS use by default.
Two facts follow from this design and matter when you interpret results:
- Each hop's time is measured to that router, but the reply travels back on whatever path the router chooses. The return path may differ from the forward path.
- The tool sees only the routers' replies to the probes. It does not see how real traffic is treated.
Reading latency
Latency in a trace should generally rise as you move away from you. Small steps are normal. Large steps point to distance or congestion.
- A jump of 1 to 5 ms between hops is typical inside one network.
- A jump of 70 to 100 ms between two hops often means an ocean crossing. Hop names containing city or airport codes can confirm this.
- A jump that stays high for all later hops means the delay is real and is on the path at or before that hop.
- A single slow hop followed by fast hops is not a problem on the path. That router is slow to generate ICMP replies, because answering traceroute is low priority for its CPU.
5 203.0.113.9 14 ms 13 ms 14 ms
6 198.51.100.2 240 ms 251 ms 238 ms
7 198.51.100.77 31 ms 30 ms 32 ms
8 93.184.216.34 32 ms 31 ms 31 msIn this trace, hop 6 is slow but hops 7 and 8 are fast. Real traffic is not delayed by 240 ms, since the later probes passed through hop 6 and came back quickly. Hop 6 only answers slowly.
Reading asterisks
An asterisk means a probe got no reply in time. It does not mean the router is down. Three patterns have very different meanings.
| Pattern | Likely meaning | What to do |
|---|---|---|
| `* * *` on one hop, later hops respond | That router does not send Time Exceeded, or rate limits it. Traffic passes through it. | Ignore it. |
| `* * *` on every hop from some point onward, trace never completes | Traffic is stopped at or after the last responding hop. | Treat the last responding hop as the edge of the problem. |
| Occasional single `*` among numbers | Rate limiting or a lost probe. | Re-run before drawing a conclusion. |
The first row is the most common source of false alarms. In the earlier example, hop 5 is * * * yet hops 6 and 7 respond and the trace is marked complete. The path works.
Trailing asterisks
Consider this trace:
1 192.168.1.1 1 ms
2 10.20.0.1 8 ms
3 100.64.12.5 9 ms
4 203.0.113.9 14 ms
5 * * *
6 * * *
7 * * *
...
30 * * *The trace stops getting answers after hop 4. There are three common causes:
- A router or firewall after hop 4 drops your probes or has no route onward.
- The destination is reached but its replies are blocked, so the probes work but you never see the answer.
- The return path from further hops is broken, even though forward traffic arrives.
You cannot tell these apart from traceroute alone. You then check with other tools, such as pinging the destination or testing a different port or protocol.
Special messages in the output
Sometimes a hop prints a status instead of a time. These are more useful than asterisks because the router is telling you what went wrong.
| Message | Meaning |
|---|---|
| `Destination net unreachable` (Windows) or `!N` (Linux/macOS) | The router has no route to the destination network. |
| `Destination host unreachable` or `!H` | The router reached the destination network but could not find the host. |
| `Destination protocol unreachable` or `!P` | The host does not support the protocol. |
| `!X` | Communication is administratively prohibited, meaning a filter rejected the probe on purpose. |
| `General failure` (Windows) | Your own computer could not send the probe, often because of no network connection or a missing route. |
When one of these appears, the address printed on that line belongs to the router that generated the message. The fault is at or just beyond that router. For example:
3 100.64.12.5 reports: Destination net unreachable.This means router 100.64.12.5 has no route for the destination. Look at routing on or past that router rather than at your own machine.
Loops
A routing loop sends a probe back and forth between routers. The trace shows the same addresses repeating until the hop limit runs out:
4 203.0.113.9 14 ms
5 198.51.100.2 20 ms
6 203.0.113.9 26 ms
7 198.51.100.2 32 ms
8 203.0.113.9 38 msHere two routers send traffic to each other. The fix is in the routing configuration of those routers, so report the repeated addresses to whoever operates them.
Locating the problem step by step
Use this order to turn a trace into a conclusion.
- Run the trace with name lookups off so it finishes quickly.
- Find the last hop that responded and check whether the trace reached the destination.
- If it reached the destination, compare latency along the path and look for a step that persists to the end.
- If it did not, note the last responding hop and any status message on the next line.
- Decide which network owns that hop. Private addresses (
192.168.x.x,10.x.x.x) are usually your own or your provider's equipment. Addresses in100.64.0.0/10indicate carrier-grade NAT at your provider. - Repeat the trace a few times and, if possible, from another network to confirm the result.
Where the problem sits tells you who can fix it:
- Fails at hop 1: the problem is between your computer and your gateway. Check the cable, Wi-Fi, and
ipconfigsettings. - Fails at hop 2 or 3: it is likely your provider's access network.
- Fails far into the path: it is usually another provider. You can report the last responding address to your own provider.
Common mistakes
- Treating a single
* * *line as an outage when later hops answer. - Blaming a hop with high latency when later hops are fast.
- Assuming the router named in the output owns the fault when the reply came from a different interface than the one that forwarded your traffic.
- Comparing a Windows
tracert(ICMP probes) with a Linuxtraceroute(UDP probes) and expecting identical output. Firewalls may treat the two probe types differently, so usesudo traceroute -Ifor an ICMP comparison. - Running only one trace. Paths change, so repeat the test.
Exercise
A trace to a web server shows hops 1 to 6 with steadily rising times. Hop 7 is * * *. Hops 8 and 9 reply, and hop 9 is the destination with 41 ms. Is there a problem at hop 7? Then, in a second trace, hops 1 to 4 reply and every line from hop 5 to hop 30 is * * *. What is the best conclusion?
Show answer
In the first trace there is no problem at hop 7. Later hops reply and the destination is reached, so traffic passes through hop 7. The router just does not answer probes. In the second trace the trace never reaches the destination, so the problem is at or after hop 4, the last responding hop. A router or firewall beyond it may be dropping traffic, or the return path may be broken. Confirm with another test, such as ping or a trace from another network.
Exercise
Hop 6 shows 250 ms, but hops 7, 8, and 9 show 30 ms. Does the path have 250 ms of delay?
Show answer
No. The later hops pass through hop 6 and still answer in 30 ms, so real traffic is not delayed. Hop 6 is slow only in generating its ICMP reply.