Improving roaming between Omada and Openwrt WiFi access points

4 minute read Published: 2023-03-09

Intro

If you have multiple access points, You should probably also configure WiFi Roaming for a good experience. WiFi roaming relies on 3 protocols and which are 802.11 k, v, and r.

While openwrt gives you options to configure values for these protocols, You don't get this in Omada.

So, if you have an omada access point and some openwrt access points. Your devices will tend to stick to the access point they were connected to even though another AP may have better coverage.

To fix this problem, You have to make sure Mobility domains are configured properly on all access points.

Since omada access points configure this value automatically and don't give you the option, It makes more sense to find the value that's being used by the omada APs and configure openwrt APs to use the same value.

First approach

To do this, I for no reason, tried the hard way first.

My plan at first was to create a WiFi monitor interface and keep the client interface. This way, I can capture the raw WiFi data and that should include the mobility domain in the 802.11k related packets. I kept looking for a while and didn't see any 802.11k packets.

The issue here was, Those packets only show up when the client is roaming and since I was doing that on a desktop, fixed to a place this approach failed. I didn't have a rooted android phone or some other mobile device that could support client mode and monitor mode at the same time so I didn't explore this option any further and started looking for alternative solutions.

Easier approach

My Omada Controller is running in an LXC container on proxmox. So I tried another easier approach. Once the controller software has figured out the mobility domain to use, It likely saves it somewhere so how about I dump the database and try finding it there? and this approach worked.

For this, Do the following

  1. log in to your omada controller over ssh

  2. install mongodb tools. We'll need mongodump and mongoexport for this.

  3. Run this command to dump the database.

mongodump mongodb://localhost:27217/omada
  1. Now, Go to the directory with all the json files and run this to dump all the collections into json format
for collection in $(ls | grep json  | cut -d. -f 1); do mongoexport mongodb://localhost:27217/omada --collection=$collection >> exported.json; done;
  1. Now, Look for mobility_domain
rg mobility_domain exported.json

And there you should have the mobility domains used by all the SSIDs.

Now go back to your openwrt settings page and update the values.

Some notes on this

  1. Quite a few posts on the openwrt forum that I found suggests setting the same value for the mobility domain on all SSIDs configure on the AP. This approach doesn't really make sense to me since 802.11k is supposed to give the device a list of other APs it can jump to and the device probably won't look at other SSIDs and may not be able to connect to those other wifi networks. Omada controller also favors this approach by using unique mobility domains for each SSID.

  2. All omada access points have to remain connected to the controller. They'll stop doing 802.11k shortly after disconnecting from the controller software. You'll notice this when your clients start sticking again instead of roaming freely.

  3. You can use different mobility domains for different bands but this might result in a subpar experience. For example, If the device is on a 2.4ghz network, It'll only jump to 2.4ghz ssid from the closest AP even though a 5ghz network from that AP(or some other AP) is a better option. This can be worked around by band steering but that takes some time to activate. Omada controller uses the same value for mobility domain on both bands.

  4. Omada controller derives the value for mobility domain from key_rrb. The first 4 characters from key_rrb form the mobility domain for that SSID. This value does not change unless you destroy and recreate the SSID.