But gives a failure with DHCPCD
Code: Select all
sudo cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto eth0 allow-hotplug eth0 iface eth0 inet dhcp auto eth0:0 allow-hotplug eth0:0 iface eth0:0 inet static address 192.168.178.251 netmask 255.255.255.0 auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp
This error is not only a cosmetic issue. If you plug in a new NIC like a WiFi Stick no new interface wlan1 shows up.Warning: The unit file, source configuration file or drop-ins of dhcpcd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
â dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-08-01 01:15:33 BST; 9min ago
Process: 403 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)
Aug 01 01:15:33 raspberry systemd: Starting dhcpcd on all interfaces...
Aug 01 01:15:33 raspberry dhcpcd: Not running dhcpcd because /etc/network/interfaces
Aug 01 01:15:33 raspberry dhcpcd: defines some interfaces that will use a
Aug 01 01:15:33 raspberry dhcpcd: DHCP client or static address
Aug 01 01:15:33 raspberry systemd: dhcpcd.service: Control process exited, code=exited, status=6/NOTCONFIGURED
Aug 01 01:15:33 raspberry systemd: dhcpcd.service: Failed with result 'exit-code'.
Aug 01 01:15:33 raspberry systemd: Failed to start dhcpcd on all interfaces.
So what is the correct way to use dhcpcd and have a second static IP/interface?