systemd-networkd with wpa_supplicant to manage wireless with roaming support

Finally fed up with the many tools for managing wireless and even wired connections that just seem to cause more problems than the underlying tools I discussed with a friend the idea of networkd supporting roaming profiles for wireless. Searching around he found some super good information and this is what I ended up doing. I created these files:

The following finished off the setup:

# rm /etc/resolv.conf
# systemctl enable systemd-networkd
# systemctl enable wpa_supplicant@wlp3s0
# systemctl enable systemd-resolved
# systemctl start systemd-networkd
# systemctl start wpa_supplicant@wlp3s0
# systemctl start systemd-resolved
# ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

I also elected to start using systemd-timesyncd.

# systemctl enable systemd-timesyncd
# systemctl start systemd-timesyncd

For a static ip replace DHCP=yes with the following:


The guide which this was pilfered from suggests using:
wpa_passphrase <ESSID> <passphrase> >> wpa_supplicant-wlp3s0.conf
to add new networks to the network pool. Happily borrowed from here

4 thoughts on “systemd-networkd with wpa_supplicant to manage wireless with roaming support”

  1. Does systemd-networkd handle reconnecting when the connection drops (such as when I resume my laptop from suspend)?

    Lately wicd has been unreliable for some of the networks I use, and it’s not actively maintained, so I’m looking to get rid of it, but I’d hate to lose wicd’s automatic reconnects.

    1. It does for me, I work primarily from a laptop and I often displace to do one thing or another – Always picks up the closest enabled AP for me on resume.

      1. I also am able to reconnect using this setup. It also seems to handle the roaming aspect perfectly fine as well.

        The only thing that might be a downside (but I don’t really care at all) is that there is no GUI for this. You are simply using the supporting applications/services directly instead of relying on a front end.

        But so far it was worked great for me!

Leave a Reply

Your email address will not be published. Required fields are marked *