Select Page
TCP/IP

Traceroute – computer tool for displaying path that package passed to some end point.

Path displayed as list of hops, that package goes from one router to another. Primary value of traceroute – TTL (Time to live) – mechanism that limit lifetime of package. Initial value of TTL equal 1.On every hop TTL decrease by 1, so package start his path, and if he didn’t arrive to end point, that ICMP send message backs to computer. Than computer send package again, but TTL now equal 2.

Few words about ICMP – it’s Internet Control Message Protocol that work on Internet Layer of TCP/IP model. Primary role – send message of errors that can occur during execution of some process, for example TTL equal 0 – and ICMP send message to client, and says “Opps, TTL = 0, try again”

Let’s look on console

traceroute to google.com (172.217.16.14), 30 hops max, 60 byte packets
 1  _gateway (192.168.1.1)  3.863 ms  3.833 ms  3.807 ms
 2  109.207.205.65 (109.207.205.65)  3.784 ms  3.762 ms  3.741 ms
 3  91.196.151.1 (91.196.151.1)  3.716 ms  3.845 ms  3.937 ms
 4  v1040.luna-sw.kv.wnet.ua (128.0.175.222)  4.115 ms  4.322 ms  4.431 ms
 5  google-gw1.kv.wnet.ua (128.0.168.137)  8.651 ms  8.895 ms  9.097 ms
 6  108.170.248.131 (108.170.248.131)  4.521 ms 108.170.248.147 (108.170.248.147)  1.789 ms  1.979 ms
 7  209.85.248.105 (209.85.248.105)  14.964 ms  14.617 ms  14.733 ms
 8  216.239.46.121 (216.239.46.121)  16.525 ms  16.951 ms  16.984 ms
 9  216.239.40.43 (216.239.40.43)  16.920 ms  16.882 ms 108.170.250.193 (108.170.250.193)  16.826 ms
10  waw02s13-in-f14.1e100.net (172.217.16.14)  15.476 ms  15.336 ms  15.225 ms

On this example we trying to measure what TTL needed to get google.com. In our case TTL=10. We have information about routers, spent time, max hops and length of packets. And another one example, try to view path to devopscat.tech:

traceroute to devopscat.tech (185.68.16.115), 30 hops max, 60 byte packets
 1  _gateway (192.168.1.1)  1.833 ms  2.752 ms  7.630 ms
 2  109.207.205.65 (109.207.205.65)  7.634 ms  7.613 ms  7.593 ms
 3  91.196.151.1 (91.196.151.1)  7.571 ms  7.622 ms  7.963 ms
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Now we have bigger count of hops, cause my domain not good right now 🙂 Asterisk means that our package didn’t response or acknowledged within the expected timeout