Zero-Cost Hops for Favorite Routers
What if messages could traverse your mesh infrastructure in a single hop?
What if you could bridge two cities 600 miles apart via LoRa and still have hops to spare?
What if a faster preset requires twice as many hops to reach your friends, but you don’t have hops to spare?
That’s exactly what Zero-Cost Hops unlocks for your mesh.
TL;DR (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#tldr) This feature improves message reach by preserving hops remaining between favorited routers.
Why does this matter? (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#why-does-this-matter)
• The faster presets like SHORT_FAST and SHORT_TURBO trade range for speed. In dense metro deployments that means you can burn through the 7-hops quickly.
• Zero-Cost Hops turns a mesh of well-placed infrastructure routers into a single hop leaving more hops for the first and last mile.
• For well managed networks, this could allow for communication between cities, or even countries, while staying within the 7 hop limit.
• Helps prevent CLIENT_BASE from becoming the last hop of a packet, so messages don’t die on the roof before reaching your indoor nodes.
When Do Zero-Cost Hops Apply? (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#when-do-zero-cost-hops-apply) A hop is preserved if all of these are true:
• Node role is ROUTER, ROUTER_LATE, or CLIENT_BASE.
• Not the very first hop of the packet.
• Previous relay is in your favorites and is ROUTER or ROUTER_LATE.
Miss any one of those and the hop meter ticks down as usual.
What It Doesn’t Touch (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#what-it-doesnt-touch)
• CLIENT_BASE rebroadcast rules stay exactly the same. CLIENT_BASE uses from/to, while Zero-Cost Hops uses relay_node.
• Favoriting a router does not cause CLIENT_BASE nodes to rebroadcast all packets.
• Maximum Hop limit is still 7.
“Favorite” Detection and implementation (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#favorite-detection-and-implementation) To keep the protobufs small and memory efficient, the node matches the relay_node against your favorites list and verifies the node is infrastructure.
With only 8 bits to work with in relay_node, there is a chance of collisions.
• The odds any one favorite collides with a random node is possible and increases as favorites increase.
• Colliders still need to be within range of the router to matter.
• Deduplication avoids loops.
• Accidental collisions are rare and harmless.
Probability of a collision in a sample environment:
Total NodesRouters
(3% of Total Nodes)Favorite Routers Within Range
(20% of Routers)Collision Chance100.3 (≈1)10.4 %501.5 (≈2)10.4 %100310.4 %200620.8 %4001231.2 %8002452.0 %1000306~2.3 %
Note: “Total Nodes” is the network size; collision probability is calculated based on the number of favorite routers within range, not all nodes divided by 256. For example, with 1000 total nodes and 6 favorite routers, the chance a random relay_node matches a favorite within range is about 2.3%.
Chances of a collision here is rare.
Two Quick Scenarios (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#two-quick-scenarios)
- Metro Simple Example Downtown (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#1-metro-simple-example-downtown) Setup
• Routers R1 and R2 use the ROUTER role and are favorited (to each other).
• Sender uses the CLIENT role and wants to chat with a friend in the next town.
Path
CLIENT → R1 → R2 → CLIENT
Hop Route starting at 4 maximum hops
HopActionCounterHops RemainingCLIENT → R1normal–13R1 → R2zero-cost03R2 → CLIENTnormal–12 Result: A hop is saved between R1 and R2 leaving an extra hop in case it is needed.
- Home Base, Hill-Top Backbone (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#2-home-base-hill-top-backbone) Setup
• Roof nodes use the CLIENT_BASE role and have favorited the local ROUTER nodes.
• Each hilltop uses the ROUTER role and favorites each other.
• All other nodes use the CLIENT role.
Hop Route starting at 7 maximum hops
HopPathActionCounter ChangeHops Remaining1Handheld CLIENT → Roof CLIENT_BASEnormal–162Roof CLIENT_BASE → Hilltop ROUTERnormal–153Hilltop ROUTER → Midway ROUTERzero-cost054Midway ROUTER → Remote ROUTERzero-cost055Remote ROUTER → Remote CLIENT_BASEzero-cost056Remote CLIENT_BASE → Outpost CLIENTnormal–147Outpost CLIENT → Friend of Friend CLIENTnormal–138Friend of Friend CLIENT → Friend CLIENTnormal–12 This demonstrates the ability to go beyond the 7 hop protocol limit
How to Put It to Work (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#how-to-put-it-to-work)
• Assign roles deliberately
• ROUTER for high mountaintop sites.
• ROUTER_LATE for filling in the gaps.
• CLIENT_BASE at home; favorite your handhelds.
• Curate your favorites
Mutually favorite all the infrastructure router nodes and add them to your CLIENT_BASE roof node as favorites.
• Test and trace
Run a traceroute before/after favoriting. Watch hops vanish.
tipDesign your mesh where all routers are favorited if bandwidth allows. It leaves as many hops as possible for scenic routing at the edge of the mesh.
Safety Nets Still Apply (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#safety-nets-still-apply)
• Early/default/late timing is still in effect.
• Packet deduplication works as expected.
• Most impactful with nodes in high places, so abuse is unlikely with well managed networks.
FAQ (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#faq) Can I raise the hop limit beyond seven?
Nope, it’s still seven. You just get more mileage out of each hop.
Won’t this flood the mesh?
Not likely for well managed networks.
Do I need firmware changes?
Not for clients. Only ROUTER, ROUTER_LATE, and CLIENT_BASE nodes need to be upgraded to at least 2.7.11 to support this feature.
Does CLIENT_BASE count as infrastructure?
For incoming favorited traffic from routers, yes. This avoids messages dying on the roof before reaching your indoor nodes.
Does traceroute still work?
Zero-cost hops have no effect on traceroute other than traceroute itself is limited to 7 hops.
Real-world example (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#real-world-example) For Bay Mesh, there are over 700 nodes between Tahoe and San Luis Obispo. With careful placement of routers it is possible to have messages span over 300 miles that can only be accomplished on LoRa using zero-cost hops given the terrain and distance.
Using Meshview (https://github.com/pablorevilla-meshtastic/meshview) hosted by bayme.sh (https://meshview.bayme.sh/) you can see the zero-cost hops in action between San Francisco, San Luis Obispo, and Tahoe.
Ready to Experiment? (https://meshtastic.org/blog/zero-cost-hops-favorite-routers/#ready-to-experiment) Pick two or three strategic infrastructure nodes and favorite them to each other mutually. Watch as hops are not consumed between the routers. Do the same for your roof CLIENT_BASE node and receive more messages than before.
Happy meshing. May your friends always be within range.
Write a comment