The traceroute command makes use of a intelligent method to time every hop. It makes use of a time to dwell (TTL) setting that’s decremented with every hop to make sure that every router alongside the route will in some unspecified time in the future ship again an error message. This permits traceroute to report on the length of time between every hop.
Right here’s an instance of utilizing traceroute to succeed in a neighborhood system (a single hop and a fast response):
$ traceroute 192.168.0.11
traceroute to 192.168.0.11 (192.168.0.11), 30 hops max, 60 byte packets
1 192.168.0.11 (192.168.0.11) 9.228 ms 12.797 ms 12.782 ms
This subsequent traceroute command tries to succeed in a distant system, however is unable to report on every hop (these displaying asterisks) as a result of the routers at some hops don’t reply to the kind of packet used. This isn’t uncommon.
The default most variety of hops for traceroute is 30. Discover that this setting is displayed within the first line of output. It may be modified, nonetheless, utilizing the -m argument (e.g., traceroute -m 50 distant.org).
$ traceroute www.amazon.com
traceroute to www.amazon.com (99.84.218.165), 30 hops max, 60 byte packets
1 router (192.168.0.1) 1.586 ms 3.842 ms 4.074 ms
2 10.226.32.1 (10.226.32.1) 27.342 ms 28.485 ms 29.529 ms
3 10.17.1.25 (10.17.1.25) 30.769 ms 31.584 ms 32.379 ms
4 10.17.0.221 (10.17.0.221) 33.126 ms 34.390 ms 35.284 ms
5 10.17.0.226 (10.17.0.226) 37.000 ms 38.837 ms 40.808 ms
6 204.111.0.145 (204.111.0.145) 44.083 ms 42.671 ms 42.582 ms
7 99.82.178.164 (99.82.178.164) 44.254 ms 30.422 ms 31.666 ms
8 * * *
9 * * *
10 * * *
11 52.93.40.225 (52.93.40.225) 41.548 ms 52.93.40.223 (52.93.40.223) 41.808 ms 52.93.40.225 (52.93.40.225) 43.326 ms
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 server-99-84-218-165.iad79.r.cloudfront.internet (99.84.218.165) 44.862 ms 44.746 ms 44.713 ms
mtr
The mtr (my traceroute) command combines the performance of the ping and traceroute instructions. Within the instance beneath, the mtr command is evaluating the connectivity between the native system and the default router. Discover that it reviews on the proportion of packets misplaced and the quantity despatched.
fedora (192.168.0.19) -> 192.168.0.1 (192.168.0.1) 2025-02-21T14:16:27-0500
Keys: Assist Show mode Restart statistics Order of fields give up
Packets Pings
Host Loss% Snt Final Avg Finest Wrst StDev
1. _gateway 0.0% 13 3.3 3.5 3.0 7.1 1.1
The fields reported by the mtr command embody: