"band" doesn't always restrict Wi-Fi band

Bug #1944044 reported by WGH
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Undecided
Unassigned

Bug Description

I have a netplan config that looks like this:

    network:
        wifis:
            wlan0:
                dhcp4: true
                optional: true
                access-points:
                    __REDACTED__SSID__:
                        band: 5GHz
                        password: __REDACTED_PASSWORD__

It's rendered as this:

    ctrl_interface=/run/wpa_supplicant

    network={
      ssid="__REDACTED_SSID__"
      freq_list=5610 5250 5500 5805 5640 5280 5530 5170 5060 5310 5560 5200 5755 5700 5340 5035 5230 5480 5590 5785 5620 5260 5510 5670 5040 5290 5540 5180 5845 5680 5320 5570 5210 5765 5710 5045 5600 5240 5795 5630 5270 5520 5160 5865 5660 5300 5550 5190 5745 5080 5690 5580 5220 5775 5720 5055 5825
      key_mgmt=WPA-PSK
      psk="__REDACTED_PASSWORD__"
    }

netplan documentation claims that band setting restricts the network band. However, wpa_supplicant still connects to the 2Ghz network. My hardware is Raspberry Pi 4.

It's hard to tell whose bug it is. wpa_supplicant documentation also kinda implies that this should work for restricting the band ("If set, scan results that do not match any of the specified frequencies are not considered when selecting a BSS").

I've found this claim on wpa_supplicant mailing list (http://lists.infradead.org/pipermail/hostap/2014-August/030761.html): "freq_list affects only scanning. This does not prevent drivers from roaming to other frequencies when BSS-selection is done by the driver instead of wpa_supplicant. In other words, this is not a generic solution for forcing 5 GHz band to be used."

Revision history for this message
WGH (wgh) wrote :

Partial workaround: use "bssid" to restrict BSSID to the one of 5 GHz band. I'm not sure if it's always the case, but my dual-band access point uses different BSSID for 2.4 GHz and 5 GHz (they differ in the last digit). This unfortunately won't help if your network has multiple access points.

Revision history for this message
Lukas Märdian (slyon) wrote :

I think there is little we can do on the netplan/wpa_supplicant side of things if a driver "overrides" this configuration. Maybe some kernel options can be used to restrict the specific driver to 5 GHz only?

Changed in netplan:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.