Key takeaways

  • Wired backhaul beats wireless backhaul every time; use mesh links only where you cannot run cable.
  • 802.11s is the simplest OpenWrt mesh; batman-adv on top of it adds better multi-interface routing, gateway selection and diagnostics.
  • A dedicated backhaul radio on a fixed, non-overlapping channel avoids most of the per-hop throughput loss.
  • Keep hop counts low and place gateways centrally; every wireless hop costs airtime.
  • 802.11r/k/v help roaming, but the client still decides when to roam, and some clients behave badly with fast transition.

A mesh is the right answer when you need Wi-Fi coverage across a building, campus or outdoor site and cannot cable every access point. OpenWrt gives you solid, open mesh building blocks. The difference between a mesh that works and one that frustrates users is almost entirely in the planning: backhaul, channels, hop count and gateway placement.

Mesh options in OpenWrt

802.11s is the IEEE mesh standard, implemented in the Linux mac80211 stack. Nodes with the same mesh ID, channel and credentials form peer links and select paths with HWMP at layer 2. Encryption uses SAE. It needs a full or mesh-capable wpad build; the default wpad-basic variant in standard images does not include mesh support.

batman-adv is a kernel module that does layer 2 routing over any set of interfaces: 802.11s links (with 802.11s forwarding turned off), Ethernet, or VLANs. It offers originator-based routing (BATMAN_IV, or BATMAN_V with a throughput-based metric), gateway selection for multiple uplinks, and good diagnostics through batctl. It is a common choice for larger or mixed wired/wireless meshes.

WDS (four-address mode) is not a mesh. It is a simple, reliable way to build a fixed tree of bridged repeaters, with no path selection or self-healing. It is perfectly fine for a single repeater.

Wi-Fi EasyMesh is a Wi-Fi Alliance specification for controller/agent coordination across vendors. Open implementations such as prplMesh exist, but EasyMesh is not part of standard OpenWrt images. Treat it as a product-level integration rather than a configuration option.

OptionLayer and routingBest for
802.11sL2, HWMP in mac80211Small to medium all-wireless meshes, simple setup
batman-adv over 802.11sL2, batman-adv routingLarger meshes, mixed wired and wireless, multiple gateways
WDSL2 bridge, no routingOne or two fixed repeaters
EasyMeshController and agentsMulti-vendor retail or ISP products with integration work

Wired versus wireless backhaul

Every node you can cable should be cabled. Ethernet backhaul removes airtime contention, is immune to RF changes and gives predictable throughput. In batman-adv you can add the Ethernet interface to the mesh so wired and wireless paths are used together and failover is automatic; with plain 802.11s, a wired node simply becomes another AP on the same bridged LAN.

Use wireless backhaul for the nodes that genuinely cannot be reached by cable: outbuildings, outdoor poles, heritage buildings and temporary sites. Design the mesh so that most nodes are at most one wireless hop from a wired node.

Mesh topology with a wired gateway, a wired node and wireless backhaul hops Internet uplink Router or firewall Mesh gateway Wired, central position Node A Ethernet backhaul Node B 1 wireless hop Node C 1 hop via A, 2 via B Ethernet backhaul 5 GHz mesh radio Clients use other radios Every node within one wireless hop of a wired node
Cable what you can, keep wireless hops short, and give the mesh its own radio and channel so client traffic does not compete with backhaul.

Channel planning and a dedicated backhaul radio

All mesh nodes must share one channel on the mesh radio, so channel 'auto' is not an option for the mesh interface. Choose a fixed channel and width and set it on every node.

  • Use a dedicated backhaul radio where possible. On tri-radio hardware, put the mesh on one 5 GHz radio and clients on the others. On dual-radio hardware, the mesh shares a radio with clients and every frame is effectively sent twice on the same channel.
  • Avoid DFS channels for backhaul unless you have tested radar events. A radar detection forces a channel change, and the whole mesh has to follow before backhaul is restored.
  • Do not use the widest channel by default. A narrower channel with better SNR often gives a more stable link than 160 MHz at the edge of range.
  • Plan client channels separately with the usual non-overlapping reuse, and keep client channels away from the backhaul channel.

Configuring 802.11s in /etc/config/wireless

A minimal encrypted 802.11s interface on the backhaul radio, bridged into the LAN, looks like this. Apply the same mesh ID, key and channel on every node:

config wifi-device 'radio1'
	option type 'mac80211'
	option band '5g'
	option channel '44'
	option htmode 'HE80'
	option country 'IN'

config wifi-iface 'mesh0'
	option device 'radio1'
	option mode 'mesh'
	option ifname 'mesh0'
	option mesh_id 'site-backhaul'
	option encryption 'sae'
	option key 'use-a-long-random-passphrase'
	option network 'lan'
	option mesh_fwding '1'
	option mesh_rssi_threshold '-75'

Set the country code correctly for the deployment; it controls permitted channels and transmit power. mesh_rssi_threshold stops nodes from forming marginal peer links that look connected but carry little traffic. Your radio section will also carry the hardware path generated for the board; keep it.

To run batman-adv over this link instead, set mesh_fwding '0', change the wireless interface to network 'mesh0', and define that interface as a batman-adv hard interface in /etc/config/network:

config interface 'bat0'
	option proto 'batadv'
	option routing_algo 'BATMAN_IV'

config interface 'mesh0'
	option proto 'batadv_hardif'
	option master 'bat0'
	option mtu '1536'

Then add bat0 as a port of the br-lan bridge device. The larger MTU leaves room for batman-adv headers so that 1500-byte client frames do not fragment.

Roaming: 802.11r, 802.11k and 802.11v

Roaming in Wi-Fi is decided by the client. The network can only make it faster and give hints:

  • 802.11r (fast transition) shortens re-authentication when moving between APs in the same mobility domain. Set ieee80211r '1', the same mobility_domain on all APs, and for PSK networks ft_psk_generate_local '1'.
  • 802.11k gives clients neighbour reports so they scan fewer channels. Enable with ieee80211k '1'.
  • 802.11v BSS transition management lets the AP suggest a better AP. Enable with bss_transition '1'. Steering daemons such as usteer or DAWN build on this.

Caveat: Some older or embedded clients fail to connect to SSIDs that advertise fast transition, and support for FT with WPA3-SAE varies by client. Test your real device mix. If a critical device class misbehaves, use a separate SSID without 802.11r for it.

Also lower transmit power on client radios where cells overlap heavily. APs shouting at full power encourage clients to cling to a distant AP, which no roaming protocol can fix.

Hop count, throughput loss and gateway placement

On a single shared radio, each wireless hop repeats the same data on the same channel, so usable throughput falls sharply with each hop; a common rule of thumb is roughly half per hop. A dedicated backhaul radio reduces this, but airtime on the backhaul channel is still shared by every node that can hear it.

  • Keep the design to one or two wireless hops from a wired node for anything carrying real traffic.
  • Place the gateway centrally, not at the edge where the ISP line happens to enter the building. A cable run to a central gateway is usually cheaper than an extra hop.
  • With batman-adv, multiple wired gateways in gateway mode let clients use the nearest uplink and give you failover.
  • Avoid long chains. A star of short hops around wired nodes is far more robust than a line of repeaters.

Monitoring a mesh

A mesh that worked on install day changes as furniture moves, trees grow and neighbours add networks. Monitor it continuously:

iw dev mesh0 station dump   # per-peer signal, bitrate, retries
iw dev mesh0 mpath dump     # 802.11s path table and next hops
batctl o                    # batman-adv originators and link quality
batctl n                    # batman-adv direct neighbours

Centrally, track per-link signal and bitrate, hop count per node, retry rates, channel utilisation on the backhaul channel and gateway reachability. Alert on nodes whose best path changes frequently or whose hop count increases; both are early signs of a failing link.

Common mistakes

  • Meshing nodes that could have been cabled.
  • Leaving the mesh radio on automatic channel selection, or on a DFS channel without testing radar events.
  • Mixing mesh IDs, keys or channel widths across nodes after a partial reconfiguration.
  • Running the default wpad-basic build and wondering why the mesh interface never comes up.
  • Bridging the mesh into the LAN on more than one node without loop protection, or running both 802.11s forwarding and batman-adv on the same link.
  • Upgrading firmware on the gateway first. Upgrade the farthest nodes first, so you do not lose the path to them halfway through.

How CloudWRT helps

The CloudWRT Platform includes mesh network support alongside real-time monitoring, configuration templates and scheduled firmware rollouts, so mesh ID, channel and roaming settings stay consistent across every node and changes can be rolled back. It works with OpenWrt-compatible hardware from many ODMs; see bring your own hardware.

For products that need a custom mesh stack, tri-radio board bring-up or driver work, our R&D team can help. You can also start a free trial.

Frequently asked questions

Should I use 802.11s or batman-adv?

Start with 802.11s for small all-wireless meshes. Add batman-adv on top when you have many nodes, mixed wired and wireless backhaul, multiple gateways or need deeper diagnostics.

Can I mix hardware from different vendors in an OpenWrt mesh?

Yes, if all nodes run compatible OpenWrt builds with mesh-capable drivers and the same mesh settings. Test interoperability between chipsets, as driver behaviour differs.

How many hops can an OpenWrt mesh have?

Technically many, but for good performance keep traffic-carrying nodes within one or two wireless hops of a wired node.

Does enabling 802.11r guarantee seamless roaming?

No. It shortens the handover, but the client still decides when to roam, and some clients have compatibility problems with fast transition.