Skip to contentSkip to conversation

Frequent Disconnects / Roaming Issue with IWD + systemd-networkd

DISCUSSION Martin Petzold 2 participants 2 messages Jul 28, 2024 – Jul 29, 2024

lore
Share & tools
lore
#0 lore raw

Hi all,

this issue is related to my previous issue, see [1]. It seems quite sure that BSSes are blacklisted and, therefore, do not re-connect or re-connect after a long period of time and then lose the connection again. I cannot tell the exact reason, still working on getting some logs from these devices. Changing the blacklist configurations helps in terms of the devices coming back, also adding "IgnoreCarrierLoss" in systemd-networkd configuration seems to make the situation better. However, still really bad!

I have now updated to most recent Laird firmware (11.x), IWD 1.27 and systemd 252. The problem still exists without any difference. Of course our customer now also investigates his AP infrastructure, which also could be miss-configured.

This issue is especially present with multiple AP with same SSID (typical roaming setup). But also present with single router. The signal strength of the APs is usually low between -60 and -80 (and may change also over time - closed doors etc.). We still have a stationary device. Maybe it is jumping between AP and then blacklisting these AP.

1. I wonder if the problem could be related to systemd-networkd managing the network interface and DHCP?

2. What is actually your recommended management configuration with IWD + systemd-networkd (1.27 and 2.x)?

-> Like everything should work, especially Wi-Fi and also roaming scenarios.

3. What does IWD do using the "RoamThreshold5G" value of "-76" and with two APs and same SSID (roaming) with slightly lower or changing values?

4. Is the following configuration correct, if I want IWD to manage the network interface and DHCP, and still let systemd-networkd knowing the interface?

-> I need the *.network for wait-for-online triggers and also because I am reading out the network topology using networkctl and there is also an Ethernet interface.

##### /etc/iwd/main.conf

[General]
EnableNetworkConfiguration=true

[Network]
NameResolvingService=systemd

[Scan]
InitialPeriodicScanInterval=10
MaximumPeriodicScanInterval=60

[Blacklist]
InitialTimeout=60
MaximumTimeout=3600

##### /etc/systemd/network/20-wlan0.network

[Match]
Name=wlan0

[Link]
RequiredForOnline=no

#####

[1] https://lore.kernel.org/iwd/[email protected]/T/

Thanks,

Martin

#1 lore raw

Hi Martin,

Quoted 3 lines · Martin Petzold

Hi all,

this issue is related to my previous issue, see [1]. It seems quite sure that BSSes are blacklisted and, therefore, do not re-connect or re-connect after a long period of time and then lose the connection again. I cannot tell the exact reason, still working on getting some logs from these devices.

Yeah I don't think there is much that can be done without debug logs to see exactly why.

Quoted 1 line

Changing the blacklist configurations helps in terms of the devices coming back, also adding "IgnoreCarrierLoss" in systemd-networkd configuration seems to make the situation better. However, still really bad!

So fwiw if you suspect blacklisting is the issue you can always lower the blacklist timeout very low. For our use case we have it set to 2s, only to ensure the BSS gets blacklisted for the remainder of that connection attempt. All our clients run on a known network infrastructure though, which may not be true for you, but disabling the blacklist (by setting a low maximum timeout) will only cause IWD to try connecting again after certain failures.

Quoted 6 lines

I have now updated to most recent Laird firmware (11.x), IWD 1.27 and systemd 252. The problem still exists without any difference. Of course our customer now also investigates his AP infrastructure, which also could be miss-configured.

This issue is especially present with multiple AP with same SSID (typical roaming setup). But also present with single router. The signal strength of the APs is usually low between -60 and -80 (and may change also over time - closed doors etc.). We still have a stationary device. Maybe it is jumping between AP and then blacklisting these AP.

1. I wonder if the problem could be related to systemd-networkd managing the network interface and DHCP?

Hard to say without debug logs.

Quoted 3 lines

2. What is actually your recommended management configuration with IWD
+ systemd-networkd (1.27 and 2.x)?

This really comes down to personal preference. I prefer using IWD because it removes one more dependency but there isn't any problem with using systemd-networkd either.

Quoted 5 lines

-> Like everything should work, especially Wi-Fi and also roaming scenarios.

3. What does IWD do using the "RoamThreshold5G" value of "-76" and with two APs and same SSID (roaming) with slightly lower or changing values?

If the current connection drops below the threshold IWD issues a roam scan, and if there is a better AP out there it will attempt a roam. If no better AP exists it remains on the current, even if the threshold is below that value. As long as the current RSSI is below that value IWD will continue to scan looking for a roam target.

Quoted 14 lines

4. Is the following configuration correct, if I want IWD to manage the network interface and DHCP, and still let systemd-networkd knowing the interface?

-> I need the *.network for wait-for-online triggers and also because
I am reading out the network topology using networkctl and there is also an Ethernet interface.

##### /etc/iwd/main.conf

[General]
EnableNetworkConfiguration=true

[Network]
NameResolvingService=systemd

Quoted 7 lines

[Scan]
InitialPeriodicScanInterval=10
MaximumPeriodicScanInterval=60

[Blacklist]
InitialTimeout=60
MaximumTimeout=3600

I would suggest setting MaximumTimeout to something low, at least to debug if this is indeed the issue you are seeing. If APs are routinely failing to allow clients to connect they will be blacklisted.

Quoted 10 lines

##### /etc/systemd/network/20-wlan0.network

[Match]
Name=wlan0

[Link]
RequiredForOnline=no

#####

I'm no systemd expert, but this seems fine. I think as long as you don't set any DHCP settings in systemd it should work with IWD managing the IP.

Quoted 8 lines

[1] https://lore.kernel.org/iwd/[email protected]/T/

Thanks,

Martin