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.

What is the tracepath command?

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.

More in This Category
Linux apk Command: Manage Packages on Alpine Linux

Linux apk Command: Manage Packages on Alpine Linux

Learn how to manage Packages on Alpine Linux with the Linux apk command, including practical examples, key options, and important precautions.

Linux nice Command: Set a New Process's Scheduling Priority

Linux nice Command: Set a New Process's Scheduling Priority

Learn how to set a New Process's Scheduling Priority with the Linux nice command, including practical examples, key options, and important precautions.

Linux Tutorial / Linux Terminal and Shell Basics: Command Syntax and Finding Help

Linux Tutorial / Linux Terminal and Shell Basics: Command Syntax and Finding Help

Learn the difference between a terminal and a shell, read command syntax and output, and use Bash help tools through a short hands-on exercise.

Linux diff Command: Compare Text Files and Directories

Linux diff Command: Compare Text Files and Directories

Learn how Linux diff compares text files and directories, produces unified patches, ignores selected whitespace changes, and reports differences through exit status.

Linux readlink Command: Inspect Symbolic Link Targets

Linux readlink Command: Inspect Symbolic Link Targets

Learn how to use the Linux readlink command to display symbolic link targets and optionally resolve canonical paths, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux join Command: Combine Files by a Common Field

Linux join Command: Combine Files by a Common Field

Learn how to combine Files by a Common Field with the Linux join command, including practical examples, key options, and important precautions.

Linux install Command: Copy Files and Set Attributes

Linux install Command: Copy Files and Set Attributes

Learn how to use the Linux install command to copy files while setting modes, owners, groups, timestamps, and destination directories in deployment scripts.

Linux unxz Command: Decompress xz Files

Linux unxz Command: Decompress xz Files

Learn how to decompress xz Files with the Linux unxz command, including practical examples, key options, and important precautions.

Linux time Command: Measure Command Execution Time

Linux time Command: Measure Command Execution Time

Learn how to use the Linux time command to measure elapsed, user CPU, and system CPU time for a command, with essential options, practical examples, output interpretation, and common troubleshooting tips.

How to Check IP Addresses on Linux

How to Check IP Addresses on Linux

Learn how to check private and public IP addresses on Linux, identify the active interface and route, and distinguish IPv4, IPv6, and externally visible addresses.