RPi 3 on the latest Stretch. I have a spare Wifi USB dongle I'd like to use, for the most part. I have it configured for a static IP so I can reach via home-local domain name.
But sometimes I need to steal that adapter for a different machine. When that happens, I would like the network to fallback to the built-in Wifi, but use the same static IP address, automatically. Furthermore, when the USB dongle is plugged in, it should always take priority over the built-in Wifi.
Is there a way to do this with DHCPCD, or something else? I've been using wicd-curses but it's just ... buggy as hell sometimes and I worry about using abandonware.
I've added the following to my dhcpcd.conf file, but the default Wifi always seems to take priority:
Please note that I've tried this with and without specifying my SSID. Also tried reversing the metric order in case I read incorrectly (the metric property specifies priority, yes?).
Code: Select all
ssid [my ssid] interface wlan0 metric=1 static ip_address=192.168.1.202/24 static ip6_address=[sorry too lazy] static routers=192.168.1.1 static domain_name_servers=192.168.1.101 192.168.1.102 ssid [my ssid] interface wlan1 metric=0 static ip_address=192.168.1.202/24 static ip6_address=[sorry too lazy] static routers=192.168.1.1 static domain_name_servers=192.168.1.101 192.168.1.102
Any help appreciated! I'm happy to switch to NetworkManager or anything that works, if needed. I might switch to wicd for awhile if I can get it going there instead.