Q: systemd-networkd, wpa_supplicant and multiple USB Wifi adapters
johannes.ernst at gmail.com
Mon Jan 12 14:01:43 EST 2015
Is there a way to run a single wpa_supplicant process that handles any kind of USB WiFi adapter in connection with systemd-networkd?
I'm running systemd-networkd, which has made networking setup a lot easier for wired interfaces. I'd like to make it just as easy for WiFi interfaces, with a wildcard setup so it works for any kind of WiFi adapter (well, whose drivers are installed).
Here's my /etc/systemd/network/wifi.network:
This works with a named interface:
systemctl start wpa_supplicant at wlp0s2f1u10
because that's the interface that my current WiFi USB adapter comes up on. This goes with /etc/wpa_supplicant/wpa_supplicant-wlp0s2f1u10.conf:
There are two disadvantages:
* I have to plug my USB Wifi adapter into this exact USB port, otherwise the interface name changes and wpa_supplicant isn't running there
* if I plug in a different USB WiFi adapter (I have a zoo; nothing exceptional I guess, but it's a pain to keep track of which goes with which computer), the interface name may be different and wpa_supplicant isn't running there
I tried to run wpa_supplicant with the -u flag and without the interface ("systemctl start wpa_supplicant") but I never end up with an DHCP IP address after boot.
Is there a way to make this work?
See also related discussion on the Arch Linux forum: https://bbs.archlinux.org/viewtopic.php?pid=1492280
More information about the HostAP