Skip to main content

Traceroute and Path Diagnostics

What Is Meshtastic Traceroute?

Traceroute is a diagnostic feature built into Meshtastic firmware that lets you discover the actual path a packet takes through the mesh to reach a destination node. Unlike a simple ping, traceroute collects the ID of each intermediate node that relayed the packet, along with signal quality data for each hop, giving you a complete picture of how your mesh is routing traffic.

How It Works

When you initiate a traceroute, your node sends a special packet addressed to the destination node ID. Each router node that relays the packet appends its own node ID and the SNR at which it received the packet to the route record. When the destination receives the packet, it sends the complete hop list back to you. The result is an ordered list: source → relay 1 → relay 2 → ... → destination.

Traceroute uses the same flood-routing mechanism as normal traffic, but the route-record payload grows with each hop. This means traceroute is more bandwidth-intensive than a regular message and should be used sparingly on busy networks.

Running Traceroute from the App

In the Meshtastic Android or iOS app:

  1. Open the Node List and tap the target node.
  2. Tap the three-dot menu or the node detail view.
  3. Select Traceroute.
  4. Wait for the result - it may take 10 - 30 seconds depending on hop count and channel utilization.

The result displays each hop's node ID and the SNR value observed at that hop.

Running Traceroute from the CLI

meshtastic --traceroute !a1b2c3d4

Replace !a1b2c3d4 with the destination's node ID (the exclamation-mark prefix is required). The CLI prints each hop as it is received:

Traceroute to !a1b2c3d4:
 !a1b2c3d4 --> !11223344 (SNR: 8.25) --> !55667788 (SNR: 4.50) --> !a1b2c3d4

Interpreting the Output

  • Hop count: fewer hops generally means lower latency and higher reliability.
  • SNR values: higher is better. An SNR below -10 dB on a hop indicates a weak link that may drop under worse conditions.
  • Missing hops: if the traceroute times out without a complete result, the destination may be unreachable or the return path failed.

Using Traceroute to Diagnose Coverage Gaps

Run traceroute from multiple points in your network to map which nodes are serving as critical relays. If a single node appears in most traceroute paths, it is a single point of failure - consider adding a redundant node nearby. An unexpectedly long hop count (e.g. 5 hops when you expect 2) suggests a shorter path exists but is not being used, possibly due to SNR thresholds or a misconfigured router role.

Comparing Two Runs to Detect Path Changes

Run traceroute to the same destination before and after a node failure or configuration change. A change in the hop list confirms that traffic is now routing differently. This is especially useful after repositioning a relay node or changing antenna - it lets you verify the improvement objectively rather than relying on signal reports alone.