tracepath command in Linux is used to traces path to destination discovering MTU along this path. It uses UDP port or some random port. It is similar to traceroute, but it does not require superuser privileges and has no fancy options. tracepath6 is a good replacement for traceroute6 and classic example of the application of Linux error queues. The situation with IPv4 is worse because commercial IP routers do not return enough information in ICMP error messages. Probably, it will change, when they will be updated. For now, it uses Van Jacobson’s trick, sweeping a range of UDP ports to maintain trace history.
tracepath [-n] [-b] [-l pktlen] [-m max_hops] [-p port] destination
- tracepath command without any option: It will print the general syntax of the command along with the various options that can be used with the tracepath command as well as gives a brief description about each option.
- In the following example using tracepath command we are trying to trace path to destination for google.com.
- tracepath -n: This option prints primarily IP addresses numerically.
tracepath -n www.google.com
- tracepath -b: This option print both of host names and IP addresses.
tracepath -b www.google.com
- tracepath -l : This option sets the initial packet length to pktlen instead of 65535 for tracepath or 128000 for tracepath6.
tracepath -l 29 www.google.com
- tracepath -m : This option will set maximum hops (or maximum TTLs) to max_hops instead of 30.
tracepath -m 31 www.google.com
- tracepath -p: This option will set the initial destination port to use.
tracepath -p 8080 www.google.com
- until command in Linux with Examples
- bc command in Linux with examples
- apt-get command in Linux with Examples
- ps command in Linux with Examples
- tar command in Linux with examples
- ar command in Linux with examples
- scp command in Linux with Examples
- man command in Linux with Examples
- gcc command in Linux with examples
- rcp Command in Linux with examples
- tty command in Linux with examples
- fc Command in Linux with Examples
- seq command in Linux with Examples
- last command in Linux with Examples
- id command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.