Building an 802.11s mesh with fast roaming out of Raspberry Pis

Hello,

I am trying to build an 802.11s based mesh network of Raspberry Pis (RPi) with OpenWRT 21.02.0. I've been reading through the internet for days, but I'm simply stuck. There should be one main router based on a RPi 3B+ that connects to the internet via Ethernet. It then sets up an AP and a mesh node via a WLAN dongle.

The mesh clients are based on an RPi Zero. They also have a WLAN dongle and no further interfaces (no internal WLAN, Ethernet or Bluetooth). They also create a mesh point and an AP with the same settings as the main router.

Expected behavior:
Mobile devices (e.g. a tablet) can connect to the main router via it's AP and access the internet. If the tablet moves out of range of the main router and into range of a mesh client (which is in range of the AP), it will roam into the AP of the mesh client, still having internet access.

Actual behaviour:
So far, everything seems to work. But once I loose contact to the main router and stand in the vincinity of a mesh client, the tablet cannot connect to the mesh clients's AP (main router and mesh client see each other). It gets stuck at "obtaining IP address" forever. Also, when I select Network->Wireless in LuCI and look up the mesh clients under "Associated stations", it shows a "?" in the host column. That shouldn't be, should it?

I followed the the section "config" in the tutorial at https://openwrt.org/docs/guide-user/network/wifi/mesh/80211s. I omitted the section "Using the command line" as it just looked like an alternative way to the section "config".

Configuration files for the main router:

/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdf9:1cbf:74a5::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'dhcp'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrtMesh'
        option encryption 'psk2'
        option key 'secret'
        option ft_over_ds '1'
        option ft_psk_generate_local '1'
        option ieee80211r '1'
        option network 'lan'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0'
        option htmode 'HT20'

config wifi-iface 'mesh'
        option device 'radio1'
        option mode 'mesh'
        option mesh_id 'OWRTMesh'
        option encryption 'none'
        option mesh_fwding '1'
        option mesh_rssi_threshold '0'
        option network 'mesh lan'

Note that radio0 is the onboard wlan of the RPi. Since it doesn't support "mesh point" mode, I'm using an external dongle (radio1).

Configuration files for the mesh client:

/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd72:359d:b759::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'wlan0-1'
        option proto 'dhcp'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/20980000.usb/usb1/1-1/1-1.1/1-1.1:1.0'
        option htmode 'HT20'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrtMesh'
        option encryption 'psk2'
        option key 'secret'
        option ft_over_ds '1'
        option ft_psk_generate_local '1'
        option ieee80211r '1'
        option network 'lan'

config wifi-iface 'mesh'
        option device 'radio0'
        option mode 'mesh'
        option mesh_id 'OWRTMesh'
        option encryption 'none'
        option network 'mesh lan'

"iw dev" on main router

phy#1
        Interface wlan1-1
                ifindex 9
                wdev 0x100000005
                addr 90:91:64:00:50:1f
                ssid OpenWrtMesh
                type AP
                channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
                txpower 20.00 dBm
        Interface wlan1
                ifindex 8
                wdev 0x100000004
                addr 90:91:64:00:50:1e
                type mesh point
                channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
                txpower 20.00 dBm
phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr b8:27:eb:2f:b2:74
                type managed
                channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz

"iw dev" on mesh client

phy#0
        Interface wlan0-1
                ifindex 5
                wdev 0x3
                addr 90:8d:78:7c:b8:6a
                ssid OpenWrtMesh
                type AP
                channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
                txpower 20.00 dBm
        Interface wlan0
                ifindex 4
                wdev 0x2
                addr 90:8d:78:7c:b8:6b
                type mesh point
                channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
                txpower 20.00 dBm

To sum it up: how do I have to change my configuration to achieve the expected behavior? If you need any other information, let me know.

Thanks and best regards.

Hi, I've only skimmed over your description/problem, but shouldn't the meshdevices not also be bridged into LAN? Otherwise it makes no sense (to me), or your description is incomplete.

as in: replace option network 'mesh lan' with option network 'lan' on both sides.

Aren't they bridged into LAN already? The line option network 'mesh lan' means that the device configuration mesh is bridged into the interfaces mesh and lan, doesn't it?
Anyway, I notice that this statement doesn't make any sense, since there is no interface named mesh, must be a remnant from previous experiments. Thanks for the hint, I'll fix it.

Well, this is a little embarassing... :slight_smile:

Seemingly, my setup was correct, but I just noticed that only my mesh client was running version 21.02.0 while my router was running 19.07.8, which led to all kinds of erratic behaviour, like the connection problems I was talking about, but also complete system crashes, as I just figured out.
I rebuild my router with v21.02.0 and had no problems ever since.

Link 802.11s to lan only.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.