I am running a RPI4 Buster lite 4.19.
I am trying to specify a static IP address on eth0. Secondary, I want the wlan0 to take priority over eth0 for an internet connection - In fact, I do not want to have the eth0 have internet connectivity at all. I can make neither work.
Issue 1
Static IP - I have modified /etc/dhcpcd.conf with a standard static IP configuration like: I am not specifying a gateway to prevent internet connectivity.
Code: Select all
interface eth0
static ip_address=192.168.0.4/24
192.168.0.101 192.168.0.4.
The output of /etc/network/interfaces is: source-directory /etc/network/interfaces.d
/etc/network/interfaces.d is an empty directory.
I am not sure where else to look, I have googled around and tired various things to no avail. Any on how to stop pulling dhcp on an interface that already had a static address set?
issue 2
I am assuming the above will work to prevent eth0 to not access the internet because no gateway was specified. Prior on a different test pi I tried to get this to work by setting a route metric in /etc/dhcpcd.conf like:
Code: Select all
interface eth0
metric 300
interface wlan0
metric 200
Thanks in advance for any/all help.