Connect to WiFi only if ethernet disconnected or not working

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
maximumwarp
Posts: 7
Joined: Sun Jul 21, 2019 7:35 pm

Connect to WiFi only if ethernet disconnected or not working

Post by maximumwarp »

I disabled WiFi on my Pis with DietPi installed but I ask if it's possibile to configure the systems that if ethernet is disconnected or not working WiFi is enabled and used with same ethernet IP/DNS configuration.
User avatar
MichaIng
Site Admin
Posts: 2293
Joined: Sat Nov 18, 2017 6:21 pm

Re: Connect to WiFi only if ethernet disconnected or not working

Post by MichaIng »

If you enable both via dietpi-config, currently WiFi will be preferred. With v6.27 we plan to rework our network settings to be more flexible and e.g. allow to choose which to check and in case connect first.

But that would only work on boot. E.g. it is checked first if the WiFi cable is connected, in case tries to connect it and get an IP assigned, else tries to connect to WiFi.

Otherwise there are tools like ifplugd, which monitors connection states and raises the interface automatically on plug.
Post Reply