traceroute in Linux
Publisher: Psychz Networks, February 01,2016Traceroute is a tool used to trace the echo requet and echo reply from to routers. This tool is used to get an overview on traffic flow betwen destinations to identified network latencies betwen hops.
To install traceroute
yum install traceroute -y
To use traceroute
traceroute 8.8.8.8
or
traceroute google.com
IP or hostname its optional, the local Linux machine will resolve host to IP if you are using a domain name.
How to read results
1 unassigned.psychz.net (208.87.243.17) 1.168 ms 1.188 ms 1.267 ms
2 10.99.99.5 (10.99.99.5) 0.286 ms 0.285 ms 0.261 ms
3 google.as15169.any2ix.coresite.com (206.72.210.41) 0.634 ms 0.599 ms 0.667 ms
4 216.239.59.211 (216.239.59.211) 0.437 ms 209.85.245.247 (209.85.245.247) 0.519 ms 0.511 ms
5 216.239.51.79 (216.239.51.79) 0.866 ms 216.239.62.103 (216.239.62.103) 1.284 ms 209.85.255.85 (209.85.255.85) 1.155 ms
6 google-public-dns-a.google.com (8.8.8.8) 0.969 ms 0.982 ms 0.562 ms
This result shows 6 hops it took from the start to the google.com local router. The time it took to reach from A to G is an average of 1ms, this totals to one millisecond from point to point. This results shows the flow of traffic between psychz test machine to google being an average of 1ms which is good.
An abnormal trace looks like
traceroute to googlezz.com (115.28.234.176), 30 hops max, 40 byte packets
1 unassigned.psychz.net (208.87.243.17) 0.531 ms 0.603 ms 0.672 ms
2 10.99.99.5 (10.99.99.5) 0.245 ms 0.237 ms 0.215 ms
3 v807.core1.lax2.he.net (66.220.10.121) 0.327 ms 11.622 ms 11.610 ms
4 64.62.166.218 (64.62.166.218) 0.540 ms 66.160.172.118 (66.160.172.118) 2.517 ms 64.71.137.2 (64.71.137.2) 0.845 ms
5 219.158.102.125 (219.158.102.125) 152.829 ms 152.782 ms 152.739 ms
6 219.158.97.237 (219.158.97.237) 153.638 ms 153.622 ms 153.614 ms
7 219.158.101.45 (219.158.101.45) 218.162 ms 217.253 ms 217.225 ms
8 219.158.15.42 (219.158.15.42) 193.371 ms 193.357 ms 193.371 ms
9 * * *
10 * * *
11 * * *
12 42.120.245.26 (42.120.245.26) 178.467 ms 42.120.245.58 (42.120.245.58) 163.962 ms 42.120.245.54 (42.120.245.54) 169.687 ms
13 115.28.234.176 (115.28.234.176) 169.491 ms 169.379 ms 169.391 ms
This example we made up to googlezz.com took 13 hops betwen start to end. The * means that hop 9-11 are firewalled, and the avareage MS is over 100ms. This is not bad for say but it shwos that there's sliht latency between networks. The latency starts after hop 5 then progressively starts to get worst.