Traceroute

Also known as: tracert

On this page 7

Traceroute is a diagnostic tool that discovers the sequence of routers (hops) a packet crosses on its way to a destination and measures the round-trip time to each hop. In network monitoring, it is one of the first tools used to locate where along a path latency rises, packets are lost or traffic takes an unexpected route. On Windows the same function is provided by the command tracert.

Traceroute does not use a dedicated protocol. It exploits a side effect of the IP header field Time to Live (TTL), called Hop Limit in IPv6, and the ICMP error messages routers send when that field runs out.

How traceroute discovers each hop

Traceroute sends probes with a deliberately small TTL and increases it step by step. Every router decrements the TTL by one; when it reaches zero, the router discards the packet and returns an ICMP Time Exceeded message. The source address of that message reveals the router, and the time between sending the probe and receiving the reply gives the round-trip time to that hop.

The first probe uses TTL 1 and reveals the first router, the next uses TTL 2, and so on until the destination itself answers. By default most implementations send three probes per hop and stop after 30 hops. The destination is recognized by a different reply: an ICMP Port Unreachable for UDP probes, an ICMP Echo Reply for ICMP probes, or a TCP SYN-ACK or reset for TCP probes.

Each line of output therefore shows a hop number, the responding address or its reverse DNS name and three timing values in milliseconds. An asterisk means that no reply arrived within the timeout, typically a few seconds per probe.

Traceroute probe methods and implementations

Implementations differ mainly in the type of probe they send, and that choice decides whether firewalls along the path let the probes through. The table summarizes the common methods.

Probe typeDefault inDestination replyPractical note
UDP to high portsUnix and Linux tracerouteICMP Port UnreachableOften blocked by firewalls at the destination
ICMP Echo RequestWindows tracert, traceroute -IICMP Echo ReplyWorks where ping is allowed
TCP SYNtcptraceroute, traceroute -TSYN-ACK or resetPasses firewalls that allow port 443 or 80
Paris-style fixed flowParis traceroute, MTR optionsDepends on probe typeKeeps one path across load balancers
Probe types used by traceroute tools

Load balancing complicates the picture. Routers using ECMP hash packet header fields to choose a path, and classic traceroute changes the port numbers for each probe, so successive hops may come from different parallel paths. Paris traceroute keeps the flow identifiers constant to produce a consistent path, and its multipath mode enumerates all of them.

Reading traceroute output correctly

Traceroute output is easy to misread, because routers treat probes that expire on them differently from traffic they simply forward. Generating ICMP replies is handled by the router’s control plane, which often rate-limits or deprioritizes them. A slow or silent hop is therefore not proof of a problem.

PatternLikely meaningProblem on the path
Asterisks at one hop, later hops fineRouter does not answer or rate-limits ICMPNo
High RTT at one hop onlySlow control-plane response on that routerNo
RTT rises at one hop and stays highReal delay introduced at or after that linkLikely
Asterisks from one hop to the endFiltering or a break in the pathPossibly, verify with TCP probes
Large jump between distant citiesLong physical distance or undersea cableUsually expected
Same addresses repeatingRouting loopYes
Common traceroute patterns and what they mean

The rule of thumb is that only latency or loss that persists to the final hop affects the traffic. Light in fiber covers roughly 200 km per millisecond, so a jump of about 70 to 80 ms across the Atlantic is physics rather than congestion.

Traceroute gives a snapshot of one path at one moment. Related tools add repetition, statistics or bandwidth measurement, and they are often used together during troubleshooting.

ToolWhat it measuresBest used for
PingReachability and RTT to one hostQuick check whether a host answers
TraceroutePath and RTT per hop, one passLocating where a path changes or breaks
MTRContinuous traceroute with loss and jitter per hopIntermittent loss and latency problems
iPerfAchievable throughput between two endpointsBandwidth and capacity testing
Packet captureEvery packet on an interfaceProtocol-level analysis
Traceroute and neighboring diagnostic tools

For ongoing monitoring, platforms run scheduled traceroutes or MTR tests from several probes and alert when the path or latency profile deviates from the network baseline.

Limitations of traceroute

Traceroute shows only the forward path, from the source toward the destination. Internet routing is often asymmetric, so the return traffic may take a completely different route that the output does not reveal. A complete diagnosis therefore needs a traceroute from both ends.

  • MPLS tunnels may hide internal hops entirely unless the provider propagates TTL.
  • Reverse DNS names can be outdated and give misleading locations.
  • ICMP replies may come from a different interface than the one the probe arrived on.
  • Firewalls and NAT devices may drop probes or answer on behalf of hidden hosts.

Used with these limits in mind, traceroute remains a fast and reliable first step for answering where a path goes and roughly where trouble begins.

In everyday language

Traceroute shows the stops a piece of data makes on its way across a network and how long each stop takes to answer. It works a bit like sending a series of letters, each one told to come back after one more post office than the last.

By collecting the replies, you get a list of every post office on the route. If the delay jumps and stays high after a certain stop, that is where to start looking for the problem.

Seen in the real world

Remote employees of a design studio complain that a cloud storage service has become slow every evening. The network administrator runs MTR and traceroute from the office and from an employee’s home connection to the service’s address.

Both paths look normal up to the home provider’s border router, where round-trip time jumps from about 12 ms to roughly 95 ms and stays high on every following hop, with a few percent of loss. Earlier hops with occasional asterisks are ignored because later hops respond normally. The administrator sends the traceroute output with timestamps to the provider, which confirms a saturated peering link and adds capacity within the week.