Traceroute Command Builder

Build tracert, pathping, traceroute and mtr commands to trace the path to any host.

Advertisement

Traceroute Command Builder (tracert, pathping, traceroute, mtr)

A traceroute shows every router (hop) a packet passes through on its way to a destination, along with the round-trip time to each one. It is the go-to tool for finding where on a path latency spikes or packets are lost. This builder generates the correct command for whichever tool you use: tracert and pathping on Windows, or traceroute and mtr on macOS and Linux.

Which tool to use

  • tracert (Windows) sends ICMP Echo packets with increasing TTL values and prints each hop once.
  • pathping (Windows) traces the route, then pings every hop for ~25 seconds to compute per-hop packet loss — better for intermittent problems.
  • traceroute (macOS/Linux) uses UDP by default; add -I for ICMP or -T for TCP to get through firewalls that block UDP.
  • mtr combines traceroute and ping into a live, continuously updating display. Install it with apt install mtr or brew install mtr.

Common options

Goaltracerttraceroute
Skip DNS lookups (faster)-d-n
Set max hops-h 20-m 20
Per-hop timeout-w 2000 (ms)-w 2 (sec)

Worked examples

tracert -d 8.8.8.8
pathping -n -q 50 example.com
traceroute -I -m 20 example.com
mtr --report -m 20 example.com

The first traces to Google DNS without resolving hostnames. The second runs pathping with 50 queries per hop for loss statistics. The third forces ICMP on Unix to slip past UDP-blocking firewalls. The fourth runs mtr once and prints a summary report.

Reading the output

Each line is one hop, numbered from your router outward, with up to three round-trip samples. A jump in time that stays high on every later hop usually means real latency was added at that point. A single * * * line is often just a router that does not reply to ICMP (cosmetic, not a fault); loss that persists to the destination is the real problem. The final hop should be your target host.

Tips and pitfalls

  • High latency on one middle hop that does not carry through to later hops is normal — routers de-prioritize replying to their own ICMP.
  • Run it from the affected machine, not a different network, so the path matches the problem.
  • Use pathping or mtr for flaky connections; a single tracert pass can miss intermittent loss.

Frequently Asked Questions

What does tracert do?+

tracert maps the path a packet takes to a destination, listing each router (hop) along the way and the round-trip time to it. It works by sending packets with increasing time-to-live values so each router in turn reports back, which helps pinpoint where latency or packet loss occurs.

What is the difference between tracert and pathping?+

tracert prints each hop once for a quick view of the route. pathping traces the route and then pings every hop for about 25 seconds to measure per-hop packet loss, so it is better for diagnosing intermittent or flaky connections.

Why do some traceroute hops show asterisks or a star?+

A star or asterisk means a router did not reply within the timeout. Many routers de-prioritize or block ICMP responses to themselves, so a single starred hop is usually cosmetic. Only loss that continues to the final destination indicates a real problem.

How do I speed up a traceroute?+

Add -d on Windows tracert or -n on Unix traceroute to skip reverse-DNS lookups, which often cause most of the delay. You can also lower the maximum hop count with -h or -m if you only need the early part of the path.

This tool is provided for informational and educational purposes only. All processing happens in your browser — no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results.