TRACEPATH(8)
๐ฆ NAME ๐ฆ
okay so tracepath is literally the tool that traces the path to a network host while figuring out the MTU along the way ๐ฃ๏ธโจ fr it's giving "traceroute but make it cute" ๐
๐ SYNOPSIS ๐
tracepath [-4] [-6] [-n] [-b] [-l pktlen] [-m max_hops] [-p port] [-V]
{destination}
๐ DESCRIPTION ๐
bestie, tracepath traces the network path to destination and discovers the MTU along that path ๐ง it sends UDP probes to port port, or to some random port if you don't pick one ๐ฒ
it's super similar to traceroute, but the big difference is that you don't need superuser privileges ๐ and it has no fancy options, so it's giving simple and iconic energy ๐
tracepath -6 is a seriously good replacement for traceroute6, and it's a classic example of using Linux error queues ๐ง ๐ฅ IPv4 is kinda messy tho ๐ญ commercial IP routers don't send back enough info in their ICMP error messages. hopefully that changes once they get updated ๐ for now it uses Van Jacobson's trick, which means sweeping a range of UDP ports so it can keep track of the trace history ๐ฆ
๐ธ OPTIONS ๐ธ
-4โ use IPv4 only, no IPv6 drama ๐ โโ๏ธ-6โ use IPv6 only ๐-nโ print IP addresses numerically, so no name lookups โจ-bโ print both host names and IP addresses ๐-lโ sets the initial packet length to pktlen instead of the default of 65535 for IPv4 or 128000 for IPv6 ๐ฆ-mโ sets the maximum hops (aka max TTLs) to max_hops instead of the default of 30 ๐-pโ sets the initial destination port to use ๐ฏ-Vโ prints the version and exits ๐ท๏ธ
๐ OUTPUT ๐
this is what it looks like when you run it, and it's kinda cute ngl ๐ฅน
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
okay so breaking it down for you ๐ง
the first column is the TTL of the probe, followed by a colon. usually the TTL comes from the reply from the network, but sometimes the reply doesn't have what we need, so we have to guess ๐ฎ when that happens the number gets a ? after it.
the second column is the network hop that replied to the probe. it's either the address of the router, or the word [LOCALHOST] if the probe never actually went out to the network ๐
the rest of the line is misc info about the path to that hop. it has the RTT, and it can also show the Path MTU whenever that changes ๐ if the path is asymmetric, or the probe finishes before reaching the hop you asked for, the number of return hops shows up next to the keyword asymm ๐ this info isn't 100% reliable tho. like, the third line shows an asymmetry of 1, and that's because the first probe with a TTL of 2 got rejected at the first hop because of Path MTU Discovery ๐
the last line is the summary of all the paths to the destination โจ it shows the detected Path MTU, the number of hops to the destination, and our guess for the number of hops back from the destination to us. those can be different when the path is asymmetric ๐ฆ
๐จ HANDLING ERRORS ๐จ
so when something goes wrong, tracepath prints a short error code ๐ญ here's the tea:
!AโEACCESโ communication administratively prohibited ๐ซ!HโEHOSTUNREACHโ destination host unreachable ๐ฅฒ!NโENETUNREACHโ destination network unreachable ๐!PโEPROTOโ destination protocol unreachable ๐ซpmtu NโEMSGSIZEโ message too long ๐ฆreachedโECONNREFUSEDโ connection refused ๐ โโ๏ธ- (no output label) โ
ETIMEDOUTโ connection timed out โฐ NET ERROR Nโ (no code) โ any other error ๐คทโโ๏ธ
๐ SEE ALSO ๐
traceroute(8), traceroute6(8), ping(8) ๐
๐ฉโ๐ป AUTHOR ๐ฉโ๐ป
tracepath was written by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> ๐ซถ
๐ SECURITY ๐
no security issues โ
okay but this deserves a little more detail, bestie ๐ tracepath is not a privileged program, unlike traceroute, ping and other beasts of their kind ๐
anyone who has enough network access to send UDP datagrams to the desired destination on the given port can run it ๐ธ
๐ฆ AVAILABILITY ๐ฆ
tracepath is part of the iputils package ๐
iputils 20240905 vibes, TRACEPATH(8) forever ๐โจ stay curious, stay gorgeous, and keep those MTUs in check bestie ๐ซถ๐
๐ฆ where this page comes from
- centos-stream 10: iputils 20240905-5.el10 ยท BSD-4-Clause-UC AND GPL-2.0-or-later
- opensuse-leap 16.0: iputils 20240905-160000.2.2 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: iputils 20240905-160000.2.2 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: iputils 20240905-160000.2.2 ยท BSD-3-Clause AND GPL-2.0-or-later
- opensuse-leap 16.0: iputils 20240905-160000.2.2 ยท BSD-3-Clause AND GPL-2.0-or-later
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms