dhcpcd-discuss

Re: dhcpcd is running but no ip allocated

Roy Marples

Fri Sep 18 08:51:35 2020

On 18/09/2020 08:25, daggs wrote:
Greetings Roy,

I am unaware how to toggle tap on or off.
How are you starting dhcpcd? init.d/net.tap0 or init.d/dhcpcd?
If the former, try the latter.

I'm using the former in a hotplug method as libvirt depends on net and the adapter is net, I don't see any way to use the latter in my boot flow unless you have any suggestion.


If still failing add this to the top of /etc/dhcpcd.conf and email the log file

debug
logfile /var/log/dhcpcd.log


log can be found at https://dpaste.com/AEVLUFZSV
veth is the adapter in question, enp0s20f0u7 is a physical nic I'm using to connect to the machine in order to be able to extract the logs.
the first veth part is at boot when the first calling for dhcpcd of the device is issued.
the second one is later when I do it manually.

btw, currently I don't have enp0s20f0u7 plugged at boot, if I leave it plugged at boot, than veth gets ip.
I think that issue is that the device might not be ready to be be used when dhcpcd is called.

Yoiks!

Firstly I would ditch hotplug. dhcpcd has this covered already - infact it has it covered twice because I can see you are using udev as will and dhcpcd listens to udev hotplug.
There is an error in your hotplug command - the -m option does not take an argument.
control command: dhcpcd -t 0 -m 6 veth
This means zero timeout in master mode with the interfaces 6 and veth.

Secondly, I don't see any tap interfaces in your logs?

If you're using net.tap0 to create the tap0 interface that's fine, just don't set any network directives such as dhcp etc.
Just use init.d/dhcpcd as well.

You may wish to consider using init.d/network over net.tap0 as it was designed just to create the interface link rather than manage the whole food chain.

Roy

Follow-Ups:
Re: dhcpcd is running but no ip allocateddaggs
References:
dhcpcd is running but no ip allocateddaggs
Re: dhcpcd is running but no ip allocatedRoy Marples
Re: dhcpcd is running but no ip allocateddaggs
Archive administrator: postmaster@marples.name