macOS Wi-Fi Roaming

One of the nice things about Intel wireless chipsets is that the drivers expose a lot of controls to help tune the chipset’s operation. One of my favorite of these controls is “Preferred Band,” which I usually adjust to instruct the chipset to prefer the 5 GHz band over the 2.4 GHz band. There are some other useful controls like “Roaming Aggressiveness” and you can also enable Fat Channel Intolerance if a neighbor is rudely using 40 MHz of spectrum in 2.4 GHz.

intel_driver

Although macOS has many advantages over Windows when it comes to Wi-Fi, such as the ability to natively do packet captures with the internal chipset, macOS doesn’t have the same level of customization as a Windows machine with an Intel chipset. And my experience has been that Mac clients don’t roam particularly well. Too often they are “sticky clients” and you need to disable/enable Wi-Fi on them to get them to associate with a better BSS.

Here’s a screenshot for a MacBook Air which wouldn’t roam away from a BSS whose RSSI has fallen to -80 dBm, while the laptop was only able to transmit at MCS 0, 7 Mbps. However there was another BSS in the -60’s which would have allowed for much better Wi-Fi performance.

macos_wifi
Why is the native macOS Wi-Fi menu showing a full signal with -80 dBm RSSI and MCS 0? Wi-Fi Signal tells the real story.

In 2016 Apple published a webpage that explains how macOS makes roaming decisions and what roaming features it supports. This is very helpful and I wish other manufacturers would do the same. The algorithms that control client roaming are usually a black box, so Wi-Fi engineers have make a lot of assumptions about them when designing WLAN’s for clients that require efficient roaming. That said, while Apple says Macs should usually roam at -75 dBm, that doesn’t match my experience. Sometimes Macs are just sticky.

One reason for this is that once the roaming threshold is crossed, a Mac will only roam to a BSS that is 12 dBm louder than the current BSS, which would require a roaming candidate BSS to have an RSSI of -63 dBm or better before roaming will occur at -75 dBm. There doesn’t appear to be any way to modify this value.

Enabling 802.11k or 802.11v won’t help because macOS does not yet support those features, although they don’t prevent Macs from using an SSID that has them enabled. 802.11k and .11v are supported in Windows 10, however, if the wireless adapter supports those features.

There is an old plist that once controlled “opportunistic” roaming behavior, which I suspect meant roaming above -75 dBm RSSI.

/Library/Preferences/com.apple.airport.opproam

…which has these defaults in macOS 10.12 Sierra:

{
    deltaRSSI = 10;
    disabled = 0;
    useBonjour = 0;
    useBroadcastBSSID = 1;
}

That looks promising, however, this plist hasn’t been used by macOS since macOS 10.10 Yosemite. It’s ignored by the OS now, and when it was utilized, it wasn’t intended to be user-editable, so changes were likely to be overwritten by the OS.

So if you are an enterprise with a fleet of Macs to manage and you run into sticky client issues, consider infrastructure features like Cisco’s Optimized Roaming or Aruba ClientMatch to force better roaming behavior among these clients.

To observe roaming behavior on a Mac, I recommend Wi-Fi Signal from Adrian Granados. It can be setup to generate macOS notifications when roaming events occur or the RSSI of the AP drops below a certain threshold.

wifi-signal-notifications

12 thoughts on “macOS Wi-Fi Roaming

  1. Great post, thank you Jim. A huge fan of Windows Wi-Fi settings myself as well 🙂

    Roaming / first time association decisions have a huge impact on Wi-Fi capacity overall, as it turns out. In case you didn’t see my blog post on association decisions, check it out as well: https://www.ekahau.com/blog/2017/05/30/wi-fi-capacity-planning-importance-balancing-2-4ghz-5ghz/

    Keep writing the great stuff, please.


    J

    Liked by 1 person

  2. It’s actually much worse than that. My MacBook would stick to wifi router with -90 dBm while it is next to another one with -39 dBm (both Netgear, both 5GHz, both WPA2-PSK (AES), both with the same SSID/PW). Pages are not loading. Many times I get error message that Internet connection is not working, yet the OSX (10.12.6) would not switch even if I leave it for hour like that. As soon as I turn wifi on/off it immediately switch to the stronger router. If I run Wireless Diagnostic it would tell me “you are too far from your router, try to move closer”. I AM NEXT TO ONE WITH SUPER STRONG SIGNAL FOR GOD SAKE!

    Liked by 1 person

      1. Train users to disable/enable Wi-Fi when they think they have a Wi-Fi problem. You could also test Cisco’s Optimized Roaming or Aruba’s ClientMatch, but Mac’s don’t always react well to these. The first option is the best one.

        Like

  3. Does this not apply?

    You can change the system preferences for JoinMode and JoinModeFallback to be the following:

    JoinMode (String)
    Automatic
    Preferred
    Ranked
    Recent
    Strongest
    JoinModeFallback (String)
    Prompt
    JoinOpen
    KeepLooking
    DoNothing
    Do this using the airport command:

    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport
    Run the command to see the options, up the top you’ll see a section on how to sec preferences.

    For instance:

    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs joinMode=Strongest

    and simply
    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport prefs

    to see your current settings.

    Like

    1. I believe that value is used to determine what SSID the Mac will associate to if more than one known SSID is available. It doesn’t affect how the Mac roams from BSS to BSS within the same ESS.

      Like

    2. Configuration is clearly fine, but it still doesn’t work. It would hang to the weak wifi until the signal is completely lost or when I turn wifi on/off on my macbook. Then it will re-roam immediately.

      AirPort preferences for en0:

      DisconnectOnLogout=NO
      JoinMode=Strongest
      JoinModeFallback=DoNothing
      RememberRecentNetworks=YES
      RequireAdminIBSS=NO
      RequireAdminNetworkChange=NO
      RequireAdminPowerToggle=NO
      WoWEnabled=YES

      Like

  4. Good information. thank you Jim. I Know its a too late to leave a reply here but in case if you see.
    Have you ever tested Adnriod and iOS based clients? What is their status of roaming ?
    Thanks

    Like

Leave a comment