Re: dhcpcd complains "no valid interfaces found"

Roy Marples

Tue Dec 15 08:34:48 2020

On 15/12/2020 03:34, msg board wrote:
I have multiple interfaces on my machine. I was hoping command_args="-d -j /var/log/dhcpcd.log --waitip=4 -c /usr/libexec/dhcpcd-run-hooks" in /etc/openrc.d/dhcpcd will bring up all of them at boot. But it did not as I write in previous post. I changed this to command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth3" and eth3 comes up at boot without any errors (eth3 has ethernet cable connected in this scenario) . However I am not sure where the ethernet cable may be connected in future amongst the 4 interfaces that I have, therefore I changed it to command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth0 eth1 eth2 eth3" and again I get error

eth0 : no valid interfaces found
eth1 : no valid interfaces found
eth2 : no valid interfaces found
eth3 : no valid interfaces found

Even when ethernet is connected to eth3, it does not come up with command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth0 eth1 eth2 eth3" .

So, I created 4 different startup scripts.

/etc/openrc.d/dhcpcdeth0 which has command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth0" /etc/openrc.d/dhcpcdeth1 which has command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth1" /etc/openrc.d/dhcpcdeth2 which has command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth2" /etc/openrc.d/dhcpcdeth3 which has command_args="-d -j /var/log/dhcpcd.log --waitip=4 eth3"

Now when ethernet cable is connected to anyone, that interface comes up and the rest also comes up, but without any IP as there is not ethernet cable connected to other 3 interfaces. However, after boot, only dhcpcdeth3 (the one on which cable is connected) is running. All other dhcpcd instances show stopped. Therefore, if I disconnect cable from eth3 and connect it to e.g. eth1, I cannot see eth1 with IP automatically


1) How do I specify multiple ethernet interfaces on a single instance of dhcpcd (or single command_args commandline of dhcpcd) so that only one instance of dhcpcd manages all the interfaces 2) How do I specify arguments such that after removing ethernet cable from one instance to another, the new interface gets IP address automatically.

Please let me know if any of this is possible and how. I will report my findings if I am able to figure out myself. Thank you for your time

It's perfectly possible.
I generally debug with this:
	dhcpcd -dB

and dhcpcd will try and manage all interfaces by default.
I suspect udev is at fault on your machine, disable it with nodev please.


dhcpcd complains "no valid interfaces found"msg board
Re: dhcpcd complains "no valid interfaces found"msg board
Archive administrator: postmaster@marples.name