Commands / Routes and paths

Routes and paths

tracepath

Also pmtu, path mtu

Traces the path like traceroute and also finds the largest packet the whole path carries.

tracepath needs no special rights and reports the path MTU: it starts with packets as large as your card allows and lowers the size each time a router answers fragmentation needed. pmtu 1500 at the end means full-size packets get through; a lower number shows which hop is the narrow one.

tracepath command usage

tracepath [-n] ADDRESS

Options

-n
addresses only, no name lookups

tracepath examples

tracepath -n 10.0.2.10
Traces the path to 10.0.2.10 and reports the path MTU at the end.

Reading the output

$ tracepath -n 10.0.2.10
 1?: [LOCALHOST]                      pmtu 1500
 1:  10.0.1.2                                             0.064ms
 2:  10.0.2.10                                            0.030ms reached
     Resume: pmtu 1500 hops 2 back 2
  • pmtu 1500 on a line: from that hop on, packets up to 1500 bytes pass. A drop here (pmtu 1400) shows the narrow link.
  • Resume: pmtu … hops … back …: the path MTU, hops there, and hops the replies came back over.

Pitfalls

  • If a router drops the fragmentation needed message, tracepath cannot see the narrow hop either: that is the PMTU black hole.

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Start free