Linux tracepath Command: Trace a Network Path and Path MTU

tracepath traces the hops to a destination and investigates the path maximum transmission unit (Path MTU). It can be used with regular user privileges, but not all intermediate routers respond.

A hop is a router step that a packet passes through. pmtu is information about the packet size that can be sent along the current path without fragmentation. Since it relies on ICMP errors or network policies, intermediate steps may be empty or the estimates may change. It has simpler options compared to traceroute.

Basic syntax

tracepath [option] destination

Installed implementations and options may vary depending on the distribution. Check the description for your current system with man tracepath.

Examples

Basic path tracing

Resolve the domain name to view path and MTU related outputs.

tracepath example.com

Numeric address-centered output

Reduces delays or confusion caused by reverse name lookups.

tracepath -n example.com

Hop Limit

Check the route within the first 15 hops.

tracepath -m 15 example.com

Reading Path and Path MTU

tracepath is used to check intermediate hops to the destination and the Path Maximum Transmission Unit (PMTU). Replace the destination with an address you have direct permission to check.

tracepath 192.0.2.1

Example of output structure (document address, not guaranteed to reach in reality):

1:  gateway.example  0.5ms
2:  no reply
Resume: pmtu 1500

no reply means that the hop did not respond to the probe packet, and it does not necessarily mean the connection to the subsequent destination is broken. The PMTU value can also change depending on the path and network policies. If it fails to reach, check routing, firewall, and destination response restrictions together.

Main Options and Format

Options/Format Description
-n Show numeric IP addresses instead of host names.
-4 / -6 Choose an IPv4 or IPv6 route.
-m hop Limit the maximum number of trace hops.
-l size Specify the length of the packet to send first.
-p port Specifies the initial destination port.

Precautions when using

Asterisks or missing responses may indicate that the router did not respond to the diagnostic packet, but it does not necessarily mean communication is disconnected. The route can vary on each run due to load balancing or round-trip path differences. If MTU issues are suspected, also check interface, tunnel, and firewall settings.

Frequently Asked Questions

What is the difference between tracepath and traceroute?

Both trace the path, but tracepath focuses on Path MTU discovery with simple options, while traceroute offers multiple probe methods and detailed settings.

Official Documentation

You can check the exact behavior of the options and the differences in implementation in the official tracepath documentation.