[artix-general] dhcpcd (daemon) + wpa_supplicant (daemon), with wireless bieng a failover support for wired

Javier je-vv at e.email
Sun Mar 29 08:14:20 CEST 2020


On 3/24/20 8:47 AM, Dudemanguy via artix-general wrote:
>>Has someone successfully made use of dhcpcd + wpa_supplicant in a way only one of them is up, and preferably the wired one?
> 
> I think this already works. I use the wpa_supplicant service on my laptop (specifying the wireless interface in /etc/s6/sv/wpa_supplicant-srv/conf). If I plug in an ethernet cable, it appears to prefer the wired interface (just checking the IP on the internet), and if I unplug it, it falls back to the wireless connection.

Hi !

How can this be achieved?

I imagine it can be like:

1.-  Start and enable the dhcpcd daemon.  No special configuration required (default one seems fine).
2.-  Start and enable the wpa_supplicant daemon, having configured the wireless interface on /etc/s6/wpa_supplicant_srv/conf, and having configured /etc/wpa_supplicant/wpa_supplicant.conf previously.

I read the "multiple interfaces" section of the dhcpcd man, and I wouldn't have guessed the failover mechanism from there:  "Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric.  For systems that support route metrics, each route will be tagged with the metric, otherwise dhcpcd changes the routes to use the interface with the same route and the lowest metric".

But if that's all required, then that's fantastic, :)  If only I have known before, I wouldn't have used netcfg at its time, neither its successor later on, :)

Thanks !

-- 
Javier

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20200329/a07c0fad/attachment-0001.sig>


More information about the artix-general mailing list