Traceroute is a network diagnostic command that shows the route packets take from your device to a destination, listing each router (hop) along the way with its IP address and round-trip time. It works by sending packets with increasing Time to Live (TTL) values: each router that drops a packet because its TTL reached zero replies with an ICMP Time Exceeded message, revealing its identity one hop at a time.
Key takeaways
- Traceroute reveals each router hop by sending packets with TTL values of 1, 2, 3 and so on, and recording which router drops each one.
- On Windows the command is tracert and uses ICMP; on Linux and macOS traceroute uses UDP by default, with an ICMP option.
- Asterisks and high latency at one hop do not always mean a fault — routers often deprioritize diagnostic replies, and routes change between runs.
A website loads slowly, or not at all. Is the problem your Wi-Fi, your ISP, or the website itself? Traceroute answers that question by showing you every stop your data makes on the way there.
What is traceroute?
Traceroute is a diagnostic command-line tool that displays the route packets take across an IP network, and the transit delay at each step. On Windows the command is called tracert.
Ping only measures the round-trip time to the final destination. Traceroute goes further: it shows the round-trip time of packets received from each successive host along the route, so you can see exactly where delay or failure appears.
A typical trip involves 10 to 20 hops, according to Wikipedia's Traceroute article. The first hop is usually your home router, the next few belong to your internet provider, then packets cross regional exchanges and transit networks before reaching the destination server. The reply does not always retrace the same path back.
Traceroute is built into every major operating system. You do not need to install anything to use it, and it is one of the first tools a support team will ask you to run when a connection fails.
How does traceroute work?
Traceroute works by exploiting a field in every IP packet called Time to Live, or TTL. TTL is a small counter that stops packets looping forever if routing goes wrong. It counts hops, not time.
Every router that forwards a packet decrements its TTL by one. If a router decrements it to zero, it drops the packet and sends back an ICMP Time Exceeded message from its own IP address. Traceroute turns that error message into a map.
- Send a packet with TTL 1. The first router drops it and replies. Now you know hop 1.
- Send a packet with TTL 2. It survives hop 1, dies at hop 2, and hop 2 replies. Now you know hop 2.
- Repeat, increasing TTL each round, until a packet reaches the destination and gets a normal reply instead of a Time Exceeded message.
- Record the time. For each hop, traceroute sends three probes by default and records the round-trip time of each reply in milliseconds.
Nobody designed TTL for this purpose. Traceroute is, in effect, squatting on ICMP error reporting to map a path across networks it has no control over, using nothing but error messages.
How do you run traceroute?
The command differs slightly by operating system, but the idea is the same everywhere: type the command, a space, and a domain name or IP address.
| System | Command | Default probe type | Notes |
|---|---|---|---|
| Windows | tracert example.com | ICMP Echo Request | Use tracert -d to skip reverse DNS lookups and run faster |
| macOS | traceroute example.com | UDP, ports 33434-33534 | Use traceroute -I for ICMP probes |
| Linux | traceroute example.com | UDP, ports 33434-33534 | Use -I for ICMP, -T for TCP SYN probes |
| Linux (no admin) | tracepath example.com | UDP | Similar to traceroute, does not need superuser privileges |
On Unix-like systems, traceroute sends UDP packets by default, with destination ports ranging from 33434 to 33534. On Windows, tracert sends ICMP Echo Request packets instead. Linux, FreeBSD, NetBSD, OpenBSD and macOS all include an option to use ICMP Echo Request packets, or TCP SYN packets, which can get through firewalls that block UDP probes.
When the final destination is reached, it returns an ICMP Destination Unreachable message if UDP packets are used, or an ICMP Echo Reply if ICMP packets are used. That reply tells traceroute the journey is complete.
A typical run to a well-known site takes 10 to 30 seconds. The default maximum is 30 hops; if the destination is not reached by then, traceroute stops and reports what it found.
How do you read traceroute results?
Each line in the output is one hop. A normal line shows the hop number, the router's hostname if it can be resolved, its IP address, and three round-trip times in milliseconds, one per probe.
Here is what a typical result looks like, using a fictional example:
- Hop 1 — 1 ms: your home router. This should be under 5 ms on a wired connection.
- Hop 2 — 8 ms: your ISP's first router. A jump here points at your local connection.
- Hop 3 to 8 — 15 to 40 ms: transit networks. Latency normally rises gradually as packets travel further.
- Hop 9 onward — 45 ms: the destination network. The final hop is the server itself.
Look for patterns, not single numbers. A sudden jump of 100 ms or more at one hop, which then persists for all later hops, points to a slow link at that point. A jump that disappears at the next hop usually means that one router was slow to answer the diagnostic message, not slow to forward real traffic.
High latency on the final hop but normal latency before it points at the destination server, not the network. High latency from hop 2 onward points at your ISP or your own connection. If your own connection is suspect, check your home network first — see our guide on how to secure your Wi-Fi.
What do asterisks and timeouts mean?
An asterisk means a packet was not acknowledged within the expected interval, usually a few seconds. The sender expects a reply within a configured number of seconds, and if none arrives, an asterisk is displayed.
Asterisks are the most misunderstood part of traceroute. They usually do not mean the connection is broken. Common causes include:
- Routers that ignore diagnostic messages. Many routers are configured to drop ICMP Time Exceeded replies or to rate-limit them, while forwarding real traffic normally.
- Firewalls. A firewall may block the ICMP or UDP probes traceroute uses, even though web traffic passes through fine.
- Packet loss. A congested link can drop a probe. If only one of three probes shows an asterisk, that is usually transient loss.
- A genuinely dead hop. If every hop after a certain point shows only asterisks, traffic is probably stopping there.
The key test is what happens after the asterisks. If later hops still reply, traffic is getting through and the silent router is simply not answering. If nothing after a hop replies, the path is broken at that point, and that is the information to give your ISP.
Traceroute vs ping vs MTR: what's the difference?
Ping, traceroute and MTR are related tools, and each answers a different question. Use the right one for the problem you have.
| Tool | What it shows | Best for |
|---|---|---|
| Ping | Round-trip time to the destination only | Is the server reachable, and how slow is it overall? |
| Traceroute | Every hop, with latency at each step | Where along the path is the delay or failure? |
| MTR | Traceroute repeated continuously, with loss per hop | Is packet loss intermittent, and at which hop? |
| DNS lookup | Which IP address a domain resolves to | Is the domain resolving to the right server? |
MTR, short for My Traceroute, combines ping and traceroute: it runs traceroute repeatedly and shows packet loss and latency statistics per hop over time. It is the better tool when a problem comes and goes, because a single traceroute can miss an intermittent fault. For a worked example of reading results, see Dotcom-Monitor's traceroute guide.
If traceroute shows the domain resolving to an unexpected address, check the DNS side with our free DNS lookup tool before assuming the network is at fault.
Is traceroute a security risk?
Traceroute itself is a diagnostic tool, but the information it reveals can help an attacker map a network. That is why many organizations limit it.
From an attacker's side, traceroute reveals router IP addresses, hostnames that may disclose ISPs and locations, and the number of hops to a target. Combined with port scanning, that helps an attacker plan an attack. From a defender's side, the same information helps you spot unexpected routes, such as traffic passing through a country it should not.
Firewalls commonly block or rate-limit ICMP Time Exceeded messages for this reason. That is also why traceroute often shows asterisks on corporate and cloud networks: the network is deliberately not answering.
For your own network, there is no need to block outbound traceroute from your devices, but there is also no need to expose ICMP replies from your public servers. If you run a server, check what it exposes with our free what-is-my-IP tool and a port scan from outside your network.
How do you troubleshoot with traceroute?
Use traceroute as a first step, not a final verdict. Follow this sequence when a site or service is slow or unreachable.
- Ping the destination first. If ping works but the site does not load, the problem is likely the application, not the network.
- Run traceroute to the destination. Note where latency jumps or where replies stop.
- Run it again. Routes change, so run it two or three times and look for a consistent pattern.
- Try a different destination. If every site is slow from hop 2 onward, the problem is your connection or ISP. If only one site is slow, the problem is that site or its network.
- Try ICMP and TCP modes. On Linux,
traceroute -Iandtraceroute -T -p 443can get through firewalls that block UDP probes. - Save the output. If you contact your ISP or the site's support team, paste the full output. It is far more useful than saying the site is slow.
The bottom line
Traceroute turns an invisible internet path into a visible list of hops, each with its own latency. It works with a clever trick — expiring packets on purpose — and it remains the fastest way to tell whether a slow connection is your fault, your ISP's fault, or the destination's fault.
Run it twice, look for jumps that persist, and remember that asterisks usually mean a router is not answering, not that traffic is blocked. Check your DNS first with the free DNS lookup tool if a domain resolves to something unexpected.
Frequently asked questions
What is traceroute in simple terms?
Traceroute is a tool that shows the path your data takes across the internet to reach a website or server. It lists each router along the way, called a hop, with how long each step took, so you can see where a connection slows down or fails.
What is the difference between ping and traceroute?
Ping only measures the round-trip time to the final destination. Traceroute measures the round-trip time at every router along the path, so it can show which hop is slow or unreachable instead of just telling you the destination is slow.
What is the traceroute command on Windows and Mac?
On Windows, open Command Prompt and run tracert followed by a domain or IP address. On macOS and Linux, open Terminal and run traceroute followed by the domain or IP address. On Linux you can also use tracepath, which does not need administrator privileges.
What do asterisks mean in traceroute?
An asterisk means a router did not reply within the timeout, usually a few seconds. It often means the router is configured not to answer diagnostic messages, not that the connection failed. If later hops still reply, traffic is still getting through.
Is traceroute safe to use?
Yes, running traceroute is safe and normal for troubleshooting. It sends small probe packets and reads the replies. Some networks treat repeated traceroutes as scanning, so use it for diagnosis rather than sweeping many targets.
Why does traceroute show different results each time?
Internet routing changes constantly. Load balancing can send packets down different paths, routers can be added or removed, and congestion varies by time of day. Run it a few times and look for patterns rather than trusting a single run.
Can traceroute be blocked?
Yes. Firewalls often block the ICMP messages traceroute depends on, and some routers are configured not to reply. In that case you will see asterisks or timeouts even though normal web traffic works fine.
What is a hop in traceroute?
A hop is one router or gateway that forwards your packet one step closer to its destination. A typical trip across the internet involves 10 to 20 hops, starting with your home router, then your ISP, then transit networks, then the destination network.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Wikipedia's Traceroute article and network diagnostic guides from Dotcom-Monitor and Netmaker.
How we write and fact-check →