Trace packet paths to a remote host and use hop-by-hop evidence to localize routing issues and latency spikes. Capture output as an artifact you can attach to an incident ticket.
A remote service is intermittently slow and users report timeouts. You need hop-by-hop visibility to identify where latency increases, where replies stop, and whether filtering is impacting probes.
traceroute is evidence, not a verdict. Some routers rate limit or drop TTL-expired replies, so interpret
* * *
with context and validate with alternate probe types when needed.
UDP
(default),
ICMP
, and
TCP
can produce different results depending on filtering.
sudo apt install traceroute -y
# OR
sudo dnf install traceroute -y
# OR
sudo pacman -S traceroute
Install the tool before you start collecting evidence. If the package is already present, verify the binary is available and runnable.
# Expected pattern:
traceroute package installs or reports already installed.
traceroute google.com
Each line is a hop where the TTL expired and a router (or the destination) returned a reply. The three RTT values are repeated probes per hop.
traceroute to google.com (142.250.72.46), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 1.123 ms 0.956 ms 0.902 ms
2 10.0.0.1 (10.0.0.1) 7.412 ms 6.983 ms 7.201 ms
3 96.120.45.1 (96.120.45.1) 12.881 ms 12.604 ms 12.447 ms
4 68.86.190.45 (68.86.190.45) 18.522 ms 18.410 ms 18.367 ms
5 142.250.72.46 (142.250.72.46) 23.771 ms 23.593 ms 23.541 ms
traceroute -n google.com
Numeric-only output removes DNS resolution as a factor and speeds up traces when reverse lookups are slow or blocked.
traceroute to 142.250.72.46 (142.250.72.46), 30 hops max, 60 byte packets
1 192.168.1.1 0.945 ms 0.881 ms 0.864 ms
2 10.0.0.1 6.972 ms 6.751 ms 6.538 ms
3 96.120.45.1 12.204 ms 12.093 ms 11.984 ms
4 68.86.190.45 18.207 ms 18.165 ms 18.143 ms
5 142.250.72.46 23.432 ms 23.317 ms 23.281 ms
traceroute 10.255.255.1
* * *
means no TTL-expired reply was received for that hop. This can be filtering, rate limiting, or genuine loss.
traceroute to 10.255.255.1 (10.255.255.1), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 1.011 ms 0.948 ms 0.932 ms
2 * * *
3 * * *
4 * * *
5 * * *
traceroute -m 5 google.com
A lower hop limit is useful when you only need to validate early-path behavior (local gateway, ISP edge, first transit).
traceroute to google.com (142.250.72.46), 5 hops max, 60 byte packets
1 192.168.1.1 0.987 ms 0.921 ms 0.904 ms
2 10.0.0.1 6.822 ms 6.599 ms 6.447 ms
3 96.120.45.1 11.947 ms 11.853 ms 11.774 ms
4 68.86.190.45 17.954 ms 17.903 ms 17.861 ms
5 142.250.72.46 23.275 ms 23.163 ms 23.121 ms
traceroute -I google.com
ICMP echo probes can succeed where UDP-based traceroute is filtered (or vice versa). Use this to validate whether probes are being blocked.
traceroute: using ICMP ECHO
traceroute -T google.com
TCP-based traceroute can be useful in environments where ICMP and UDP are blocked. This uses TCP SYN probes (commonly toward port 80 by default).
traceroute: using TCP SYN, port 80
traceroute google.com > trace.log
Redirecting stdout creates an artifact you can attach to an incident or troubleshooting notes.
less trace.log
Use a pager to review the hop list, RTTs, and where responses stop. This is the view you copy into a ticket when you need to show the path behavior.
Some systems restrict raw socket usage. If you see permission errors, run traceroute with appropriate privileges or use TCP mode where allowed.
This can be normal when routers rate limit TTL-expired responses. Compare results across
-I
and
-T
and look for a consistent point where responses stop.
Routing can shift due to load balancing or network changes. Capture multiple traces and compare the divergence point to localize the unstable segment.
Disable name resolution with
-n
to reduce noise and speed up collection when reverse DNS is unreliable.
This lab is read-only aside from installing packages and writing an output file. If you created artifacts, remove them when you are done and keep only what you intend to attach to a ticket.
rm -f trace.log
traceroute <host>
: Displays the hop-by-hop path to a destination.
traceroute -n <host>
: Runs traceroute with numeric output only (no DNS lookups).
-n
: Disables name resolution to reduce noise and speed up output.
traceroute -m <hops> <host>
: Limits the maximum hop depth.
-m <hops>
: Sets the max TTL/hop count (for example
5
).
traceroute -I <host>
: Uses ICMP echo probes.
-I
: Switches probing to ICMP ECHO for alternate signal.
traceroute -T <host>
: Uses TCP SYN probes (often more firewall-friendly).
-T
: Switches probing to TCP SYN (commonly toward port 80 by default).
traceroute <host> > <file>
: Redirects stdout to a file for later review.
>
: Redirects standard output to a file.
less <file>
: Opens a file in a pager for review.