802.11s based wireless mesh network

802.11s is an open-source standard for connecting wireless devices without having to set up infrastructure. It operates on Layer 2 and makes sure that all nodes can see each other on a bridged Layer 2 network (as if they were all plugged into a switch). Any Layer 3 infrastructure will work on top of this. An IP router and DHCP clients will work well. More sophisticated infrastructure can be implemented depending upon the use case. (eg Batman, Bird, OLSR etc.)

802.11s works reliably with OpenWrt 19.07 and later, including authentication and encryption, assuming that there is hardware/driver support and that wpad-mesh-openssl (or equivalent) has been installed.

:!: There appears to be an ARP relay bug (confirmed in v19.07.4) that means meshing only works reliably from the Mesh-Points that are in wireless range of the Mesh Portal (MPP). See: https://forum.openwrt.org/t/bug-report-802-11s-mesh-v19-07-4/78524/4

It is necessary to remove wpad, depending which one is installed by default:

# opkg remove wpad-mini
# opkg remove wpad-basic

Install dependencies (wpad-mesh-openssl instead):

# opkg install wpad-mesh-openssl

Edit /etc/config/wireless and make sure:

  • radio0 is not disabled
  • radio0 is configured to be compatible on each device that should join the mesh (same channel, same mesh ID, same password)
  • add an iface entry along these lines:
config wifi-iface 'mesh'
        option network 'mesh'
        option device 'radio0'
        option mode 'mesh'
        option mesh_id 'your-mesh-name' # anything, this connects the nodes into one mesh (plus the password if there's any)
        option encryption 'psk2/aes' # or 'none'
        option key 'your-secret-password'

Note: Access by client devices is achieved by bridging the 'ap' and the 'mesh' interfaces.

If you want to run a routing protocol like OLSR on your mesh, disable 802.11s's built-in routing with option mesh_fwding '0' .

For a complete list of mesh parameters you can inspect the values of the following variables in mac80211.sh Source:


Alternatively, you can issue the command

# iw dev <devname> get mesh_param 

to obtain a list of available mesh parameters, but without documentation.

Then reinitialize wifi and see if it worked:

# wifi
# logread -l 20 -f
# iw dev wlan0 station dump

:!: Support for 802.11s (type mesh) depends on wireless driver. Most up to date open source drivers work.

Use the following to determine if your hardware supports 802.11s mesh.

iw list | grep "Supported interface modes" -A 9

      Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point
                 * P2P-client
		 * P2P-GO

Example: ath9k in router

iw list
valid interface combinations:
		 * #{ managed, WDS } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match
		 * #{ IBSS, AP, mesh point } <= 1,
		   total <= 1, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz }

Example: ath9k_htc USB Stick

iw list
valid interface combinations:
		 * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
		   total <= 2, #channels <= 1

iw is a nl80211 based CLI configuration utility for wireless devices.Read more...

Create a new interface “mesh0”

iw phy phy0 interface add mesh0 type mp mesh_id mymesh

Confirm that the new interface exists

ifconfig -a | grep mesh0

     mesh0      Link encap:Ethernet  HWaddr 00:18:39:14:48:B5

Bring up your mesh0 interface

ifconfig mesh0 up

Assign the interface an IP address, e.g.

ifconfig mesh0

By default, mesh points will use channel 1 and automatically attempt to create peer links with mesh nodes with the same mesh ID and channel.

Use the iw command to display peer links or a table of reachable nodes in your mesh

iw dev $MESH_IFACE station dump
iw dev $MESH_IFACE mpath dump


iw dev $MESH_IFACE station dump
    Station 00:15:6d:84:14:10 (on mesh)
         inactive time:  1320 ms
         rx bytes:   352
         rx packets: 4
         tx bytes:   174
         tx packets: 2
         signal:     -61 dBm
         tx bitrate: 1.0 MBit/s
         mesh llid:  32577
         mesh plid:  15969
         mesh plink: ESTAB
    Station 00:15:6d:84:14:09 (on mesh)
         inactive time:  3370 ms
         rx bytes:   1064
         rx packets: 12
         tx bytes:   545
         tx packets: 7
         signal:     -53 dBm
         tx bitrate: 1.0 MBit/s
         mesh llid:  41036
         mesh plid:  24435
         mesh plink: ESTAB

This may require the iw-full package! Block a peer from meshing using its MAC address

iw dev $MESH_IFACE station set $MAC_TO_BLOCK plink_action block

Verify using section above (iw dev $MESH_IFACE station dump)

	mesh plink:	BLOCKED


iw dev $MESH_IFACE station set $MAC_TO_UNBLOCK plink_action open

according to this source plink_action is not persisted across reconnects of mesh links.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2021/01/04 22:03
  • by aaaaalbert