Traceroute command on Linux (find files) [Basic Guide]

The traceroute command in Linux returns the addresses of the machines and other network devices through which the packets pass to reach a certain destination. This path is known as the address route.

Traceroute also has its own executable for operating on IPv6, called traceroute6.

Traceroute uses the time to live (TTL) of IP packets to force an ICMP TIME EXCEEDED protocol response of each device through which the packet passes to obtain the necessary information.

The lifespan determines the maximum number of devices a packet can traverse before being deleted. This parameter is necessary so that packets do not wander around the network forever if their recipient is not found.

This command can investigate where the connectivity with the ping command is failing, and when that happens, it can most of the time be a problem with routes, or some ICMP packet filter.

The default TTL is 30 hosts.

The most common options are:

  • -n: This option disables name resolution;
  • -w sec: This option changes the default ICMP packet return wait time value of 5 seconds;
  • -f ttl: This option changes the default value for the initial lifespan of a packet;
  • -m max: Changes the default value of the maximum number of devices that will be tested by traceroute.

Example:

$ traceroute www.kernel.org 
traceroute to www.kernel.org (204.152.189.116), 30 hops max, 40 byte packets
1 10,128.0.1 6,832 ms 8,702 ms 11,401 ms
2 10.11.0.254 13,013 ms 6,261 ms 6,993 ms
& nbsp; 3 inf001010.enl-int.redeinfovias.net.br (200.150.1.10) 72.771 ms 71.875 ms 70.068 ms
(...)
13 r7-2.r8.pao1.isc.org (192.5.4.225) 236,927 ms 234,988 ms 232.748 ms
14 r8-pao1.r3.sfo2.isc.org (192.5.4.233) 225,628 ms 214,758 ms 214,469 ms
15 zeus-pub.kernel.org (204.152.189.116) 216,677 ms 219,898 ms & nbsp; 221,776 ms

Uirá Endy Ribeiro

Uirá Endy Ribeiro is a Software Developer and Cloud Computing Architect with a 23-year career. He has master's degrees in computer science and fifteen IT certifications and is the author of 11 books recognized in the IT world market. He is also Director at Universidade Salgado de Oliveira and Director of the Linux Professional Institute - LPI Director's Board.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Need help?