How to run DHCPcd on interface eth1 only [closed]

Solution 1:

No, your approach isn't correct. Raspbian uses dhcpcd instead of /etc/network/interfaces (which is considered deprecated) by default. But as you've already configured your statics IPs through that file, you can still add eth1 to it and enable DHCP for it. I.e. old-style, like this:

auto eth1
allow-hotplug eth1
iface eth1 inet dhcp

Just add those lines to the end of your /etc/network/interfaces and reboot.

This is actually considered a better approach from the Debian "makers" and dhcpcd.conf are considered unsafe. It also seems that it doesn't allows to create aliases in a normal way.

Or instead if you prefer to stick with dhcpcd, you can tell it not to mess with eth0 and only configure DHCP on eth1 in /etc/dhcpcd.conf:

denyinterfaces eth0

Please also see this question on the issue: https://raspberrypi.stackexchange.com/questions/45330/set-multiple-static-ip-in-dhcpcd-conf-raspbian-8-jessie