I use a Raspberry Pi, and have the following set in /etc/dhcpcd.conf
:
# static IP configuration:
denyinterfaces wlan0
interface eth0
static domain_name_servers=8.8.8.8 1.1.1.1
interface usb0
static ip_address=10.0.0.2/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1
Would this make the usb0-cfg, wlan0-cfg, eth0-cfg and lo-cfg files I have in /etc/network/interfaces.d/
redundant?
allow-hotplug eth0
iface eth0 inet dhcp
auto lo
iface lo inet loopback
allow-hotplug usb0
iface usb0 inet static
address 10.0.0.2
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
metric 203
allow-hotplug wlan0
iface wlan0 inet static
The wlan0 is put down and a monitor mode created in a python script, hence the denyinterfaces wlan0.
Before I just blind remove these files and break my Pi, I thought I'd ask here.
/etc/network
when usingdhcpcd
. – Seamus Oct 17 '23 at 17:56dhcpcd
writes those/etc/network
files. – Seamus Oct 19 '23 at 01:30dhcpcd
NEVER writes anything to/etc/network
. – Milliways Oct 19 '23 at 06:43