Skip to content
Latchkey

traceroute Command Reference: Flags, Usage & CI Examples

traceroute maps the network path and per-hop latency to a host.

traceroute shows the sequence of routers between the runner and a destination, with latency per hop. It is a diagnostic for where connectivity breaks down, not a routine check.

Common flags and usage

  • -n: numeric output, skip reverse DNS (faster)
  • -m <hops>: maximum number of hops
  • -w <secs>: per-hop wait timeout
  • -T: use TCP SYN probes (better through firewalls)
  • -p <port>: destination port for TCP probes

Example

shell
traceroute -n -m 20 -w 2 api.example.com

In CI

Reach for traceroute when a job intermittently cannot reach a host and you need to see where the path stalls. Use -n to skip slow reverse-DNS and -T for TCP probes, since intermediate hops often drop the default UDP/ICMP packets.

Key takeaways

  • traceroute reveals the per-hop path and latency to a host.
  • It is a diagnostic for flaky connectivity, not a routine gate.
  • -n speeds it up; -T traces better through firewalls.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →