How wpa_suppicant handles mesh networks with multiple BSSIDs per SSID

Chris Cortopassi chriscortopassi at gmail.com
Thu Dec 21 23:39:49 PST 2023


Jouni,

If I don't specify bssid, in most cases wpa_supplicant is not
iterating i.e. it keeps trying (and failing) the same bssid over and
over:

wlan0: Trying to associate with SSID 'Moss'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=be:c3:4f:d7:59:c4 status_code=16
wlan0: Trying to associate with SSID 'Moss'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=be:c3:4f:d7:59:c4 status_code=16
wlan0: Trying to associate with SSID 'Moss'
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=be:c3:4f:d7:59:c4 status_code=16


I have a mesh with many bssids:

root at DeNovix-S-12345:~# wpa_cli scan_results
Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
bc:cf:4f:d7:59:c3 5745 -43 [WPA2-PSK-CCMP][ESS] Moss
be:c3:4f:d7:59:c4 5745 -43 [WPA2-PSK-CCMP][ESS] Moss
...

If I explicitly specify bssid bc:cf:4f:d7:59:c3, it succeeds every time

wlan0: Trying to associate with SSID 'Moss'
wlan0: Associated with bc:cf:4f:d7:59:c3
wlan0: CTRL-EVENT-CONNECTED - Connection to bc:cf:4f:d7:59:c3
completed [id=0 id_str=]


How can I get wpa_supplicant to iterate over different bssids?
Are there parameters I can pass to the nl80211 driver to make it iterate?
Will upgrading from wpa_supplicant 2.9 to 2.10 help?

root at DeNovix-S-12345:~# wpa_supplicant -v
wpa_supplicant v2.9
Copyright (c) 2003-2019, Jouni Malinen <j at w1.fi> and contributors

root at DeNovix-S-12345:~# uname -a
Linux DeNovix-S-12345 5.10.95-v8 #1 SMP PREEMPT Tue Feb 1 13:12:49 UTC
2022 aarch64 aarch64 aarch64 GNU/Linux


On Sun, Dec 3, 2023 at 12:34 AM Jouni Malinen <j at w1.fi> wrote:
>
> On Thu, Nov 30, 2023 at 10:15:43PM -0800, Chris Cortopassi wrote:
> > When scan_results returns multiple rows with the same SSID but
> > different BSSIDs, how does wpa_supplicant select which BSSID to connect
> > to?
> >
> > Does it choose the strongest signal level?
> >
> > Does it iterate through each BSSID until one succeeds?
> >
> > Is there any way to control this process?
>
> All that depends on what type of driver is used.. Some drivers take care
> of BSS selection internally and wpa_supplicant does not really get
> involved with that. Other drivers allow some input from wpa_supplicant
> or fully leave this to wpa_supplicant control.
>
> When wpa_supplicant selects a suitable BSS to connect to, it estimates
> possible throughput through each viable option and picks the one with
> the highest estimated throughput. This can also be fine-tuned based on
> available security level. Failed connection attempts results in
> temporary blocking of a BSS and this results in iteration over other
> possible options.
>
> There might be some driver-specific configuration options for some
> drivers to control some details of the process. For wpa_supplicant,
> there are some configuration parameters like bssid that do have an
> impact to this, but most of the changes would likely need source code
> modification.
>
>
> --
> Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list