brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tracepath traces the route and path MTU without needing root

Linux
~/tips/tip-networking-tracepath-no-root

tracepath -n example.com

Traces the route to a host like traceroute and reports the path MTU, as a normal user.

traceroute often is not installed and sometimes wants root. tracepath from the iputils package is a lighter alternative that is usually there already.

tracepath -n example.com

It prints each hop on the way to the destination and ends with a summary line that has the path MTU and the number of hops. The man page describes it as similar to traceroute, only it does not require superuser privileges and has no fancy options. The -n flag skips reverse DNS lookups, which makes it faster.

The MTU part is what makes it useful. When a VPN or tunnel is involved and some websites hang while ping works, a path MTU smaller than 1500 is a classic cause. tracepath shows the value where it changes, so you can see which hop causes it.

You can set the starting packet size with -l and the first destination port with -p, which helps when a firewall treats the default port badly.

The caveat is in the man page itself: some lines are not reliable, such as the asymmetry readings. Treat the output as a good hint and not as proof. When you need statistics over time, mtr is the better tool.

Further reading: tracepath(8) manual

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link