TRACEPATH(8)
๐ TRACEPATH ๐
okay bestie, buckle up, this is tracepath, living in the iputils corner of your system, section 8 of the manual (that's the admin-ish section, iykyk).
โจ NAME โจ
tracepath โ traces path to a network host discovering MTU along this path ๐ฐ๏ธ
๐ธ SYNOPSIS ๐ธ
tracepath [-4] [-6] [-n] [-b] [-l pktlen] [-m max_hops] [-p port] [-V]
{destination}
๐ฆ DESCRIPTION ๐ฆ
So like, what does it do? It traces the network path to destination, discovering the MTU along this path. That's the whole vibe. ๐ซถ
It uses UDP port port, or some random port if you don't say. It's similar to traceroute, except โ and this is the iconic part โ it does not require superuser privileges, and it has no fancy options. Low maintenance queen. ๐
tracepath -6 is a good replacement for traceroute6 and is a classic example of 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 are updated. For now it uses Van Jacobson's trick, sweeping a range of UDP ports to maintain trace history. Not me explaining ancient router lore at 2am ๐ญ but here we are.
๐ OPTIONS ๐
-4โ Use IPv4 only.-6โ Use IPv6 only.-nโ Print primarily IP addresses numerically. no names, just digits, we stay mysterious โจ-bโ Print both: Host names and IP addresses. best of both worlds, main character behaviour fr fr-lโ Sets the initial packet length to pktlen instead of65535for IPv4 or128000for IPv6.-mโ Set maximum hops (or maximum TTLs) to max_hops instead of30.-pโ Sets the initial destination port to use.-Vโ Print version and exit. short and sweet, we love a swift goodbye ๐
๐ฅ OUTPUT ๐ฅ
here's what it actually looks like, obsessed honestly:
root@mops:~ # tracepath -6 3ffe:2400:0:109::2
1?: [LOCALHOST] pmtu 1500
1: dust.inr.ac.ru 0.411ms
2: dust.inr.ac.ru asymm 1 0.390ms pmtu 1480
2: 3ffe:2400:0:109::2 463.514ms reached
Resume: pmtu 1480 hops 2 back 2
Let's decode this masterpiece column by column:
- The first column shows the TTL of the probe, followed by a colon. Usually the value of TTL is obtained from the reply from the network, but sometimes it does not contain the necessary information and we have to guess it. In this case the number is followed by
?. guessing era ๐ญ - The second column shows the network hop which replied to the probe. It is either the address of the router or the word
[LOCALHOST], if the probe was not sent to the network. hi localhost, love u ๐ - The rest of the line shows miscellaneous information about the path to the corresponding network hop. It contains the value of RTT, and additionally it can show Path MTU when it changes. If the path is asymmetric or the probe finishes before it reaches the prescribed hop, the number of hops in return direction is shown next to the keyword
asymm. This information is not reliable โ e.g. the third line shows asymmetry of1. This is because the first probe with TTL of2was rejected at the first hop due to Path MTU Discovery.
The last line summarizes information about all the paths to the destination. It shows detected Path MTU, amount of hops to the destination and our guess about the number of hops from the destination to us, which can be different when the path is asymmetric. the grand finale ๐
๐ HANDLING ERRORS ๐
In case of errors tracepath prints short error code. here's the whole roster, no skips:
!Aโ codeEACCESโ Communication administratively prohibited!Hโ codeEHOSTUNREACHโ Destination host unreachable!Nโ codeENETUNREACHโ Destination network unreachable!Pโ codeEPROTOโ Destination protocol unreachablepmtu Nโ codeEMSGSIZEโ Message too longreachedโ codeECONNREFUSEDโ Connection refused- (no output) โ code
ETIMEDOUTโ Connection timed out NET ERROR Nโ (no code) โ Any other error
not the error codes serving looks while your packets are literally lost ๐ but at least they're short and readable, periodt.
๐ง SEE ALSO ๐ง
traceroute(8), traceroute6(8), ping(8).
๐ AUTHOR ๐
tracepath was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>. thank you king ๐ซก
๐ SECURITY ๐
No security issues.
This lapidary deserves to be elaborated. tracepath is not a privileged program, unlike traceroute, ping and other beasts of their kind. tracepath may be executed by everyone who has enough access to the network to send UDP datagrams to the desired destination using the given port. no root, no gatekeeping, we love accessibility ๐
๐ AVAILABILITY ๐
tracepath is part of iputils package.
okay that's the whole page bestie, and if you need the receipts: this is from iputils, version 20250605, and it's the TRACEPATH(8) page โ so go forth and trace some paths, you got this ๐ฆโจ๐
๐ฆ where this page comes from
- alpine 3.24: iputils-doc 20250605-r2 ยท BSD-3-Clause AND GPL-2.0-or-later
- arch rolling: iputils 20250605-1 ยท BSD-3-Clause AND GPL-2.0-or-later
- fedora 43: iputils 20250605-1.fc43 ยท BSD-4-Clause-UC AND GPL-2.0-or-later
- fedora 44: iputils 20250605-2.fc44 ยท BSD-4-Clause-UC AND GPL-2.0-or-later
- nixpkgs unstable: iputils 20250605
- ubuntu resolute: iputils-tracepath 3:20250605-1ubuntu1 ยท BSD-3-Clause
- ubuntu stonking: iputils-tracepath 3:20250605-1ubuntu1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms