~/Traceroute Command Detailed Guide
Mar 14, 2019
Traceroute shows the path packets take to reach a host across an IP network. It reveals each hop, measures latency, and diagnoses routing problems. Learn more here.
How traceroute works
Traceroute sends packets with increasing TimeToLive TTL values. Routers decrease TTL by 1. When TTL is zero, routers return a timeout message. Traceroute reads these replies to map the network path.
Running traceroute
Linux or macOS:
|
|
Windows:
|
|
Key output fields
- Hop: Each line shows a router hop number.
- Hostname or IP: Shows the name or IP of each hop.
- Latency: Three times are round trip delays for each probe in ms.
Options
- Set max hops:
traceroute -m 30 example.com
- Change probe count:
traceroute -q 1 example.com
- Use ICMP instead of UDP:
traceroute -I example.com
Common uses
- Diagnose network delays or failures.
- Identify unreachable hops.
- Analyze where traffic slows.
Security note
Some firewalls may block or filter traceroute packets. Timeouts or asterisks in output may mean this, see details.
For more, check official docs.