0

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.

1 Answers1

0

I removed all configuration files in /etc/network/interfaces.d/ and added the following to /etc/dhcpcd.conf:

# static IP configuration:
denyinterfaces wlan0

interface eth0 static domain_name_servers=8.8.8.8 1.1.1.1 metric=202

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 metric=203

interface bnep0 metric=204

interface lo

I also edited /boot/cmdline.txt with the following line at EOF:

systemd.restore_state=0 rfkill.default_state=1

This will automatically set rfkill unblock all at boot, each boot.