traceroute is used to discover the route that packets take to reach a remote host. It helps network engineers understand delays and determine whether intermediate hops are reachable. It works by sending UDP or ICMP packets with increasing TTL (Time To Live) values.
It may require installation depending on your distribution:
sudo apt install traceroute # Debian / Ubuntu
sudo yum install traceroute # RHEL / CentOS
sudo pacman -S traceroute # Arch Linuxtraceroute destination
Example:
traceroute google.com| Option | Description | Example |
|---|---|---|
| -n | Don't resolve hostnames | |
| -m | Set max TTL (hops) | |
| -w | Wait time for reply (seconds) | |
| -p | Set UDP port | |
| -I | Use ICMP instead of UDP | |
traceroute to google.com (142.250.72.14), 30 hops max
1 192.168.1.1 (192.168.1.1) 1.123 ms 1.217 ms 1.201 ms
2 10.0.0.1 (10.0.0.1) 3.438 ms 3.302 ms 3.446 ms
3 * * *
* indicates no response from that hop (timeout)traceroute 192.168.0.100traceroute google.comtraceroute -I example.com| Feature | ping | traceroute |
|---|---|---|
| Connectivity check | ✅ | ✅ |
| Path discovery | ❌ | ✅ |
| Hop count visibility | ❌ | ✅ |
| Protocol | ICMP | UDP or ICMP |
traceroute is an essential tool for analyzing network paths. It helps locate bottlenecks, understand latency, and monitor routing behavior across internal and external networks. Mastering its syntax and output interpretation makes it invaluable for network diagnostics.