dhcpcd-discuss

Re: dhcpcd complains "no valid interfaces found"

msg board

Tue Dec 15 03:34:45 2020

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

So,

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



On Mon, Dec 14, 2020 at 3:38 PM msg board <msgboardpana@xxxxxxxxx> wrote:

> Hello,
>
> My custom distro uses openrc. I am using dhcpcd for network management. At
> boot dhcpcd prints this
>
> dhcpcd-8.1.6 starting
> udev: starting
> dev: loaded udev
> no valid interfaces found
> timed out
> forking to background
> forked to background, child pid 972
>
>
> When I run command "ip a", lo interface is in state UNKNOWN and all other
> interfaces are DOWN . My openrc startup script for dhcpcd is like below
>
> command=/usr/sbin/dhcpcd
> pidfile=/var/run/dhcpcd.pid
> command_args="-d -j /var/log/dhcpcd.log --waitip=4 -c
> /usr/libexec/dhcpcd-run-hooks"
> name="DHCP Client Daemon"
>
> depend() {
>     provide net
>     need localmount
>     use logger network
>     after bootmisc modules
>     before dns
> }
>
>
>
> How do get dhcpcd to bring up my interfaces and get IPv4 on them.
>
> Thanks,
>
>

Follow-Ups:
Re: dhcpcd complains "no valid interfaces found"Roy Marples
References:
dhcpcd complains "no valid interfaces found"msg board
Archive administrator: postmaster@marples.name