I have small home server with usb wireless device and Rocky9. I also have several wireless networks - main wifi does not reach always and i’m using repeaters, which are configured with different wifi SID name, but they all share same ethernet network. I need server to connect to wifi without question. If wifi is availabe, connect and dont ask or wait for anything. Additionaly wireless device itself must have static IP (as it is server).
If i undestand correctly, starting with RHEL9/Rocky9 it’s not possible to use ifcfg files anymore and NM is the only way to configure network.
However NM always requires manual interventsion to create a new connection.
And as i don’t know how to implement it with NM, i’m trying to somehow get round NM. As first step i created new systemd wpa_supplicant.service and let wpa_supplicant fully to handle wireless network connections. Wifi networks are pre-configured in wpa_supplicant.conf. This part works.
Next problem is, that i can’t configure wireless device to have static IP. NM refuses to do so if it cant handle wireless connections itself.
How to solve this issue? Can it be done (automatic wireless connectons and static ip for wireless device)?
All routers have a DHCP server where you can assign a static IP address to clients/devices based on its MAC address. Manual configuration is not needed.
As using dhcp is not an option for me and i pushed my ideas a bit further and found a solution.
I noticed, that with Ubuntu server i dont have this network problem. Ubuntu uses netplan and systemd-networkd as renderer. So here it is what i did with Rocky9.
Disabled wifi device management within NetworkManager: