dhcpcd-discuss

Re: Possible to wait for dhcp server before falling back?

Roy Marples

Sat Oct 17 23:12:35 2020

Hi Jesse

On 17/10/2020 19:17, Jesse Meade-Clift wrote:
I am using dhcpcd 7.1.0 (Debian package).

Wow, that's ancient. Debian to upgrade to something .... more recent.

I have a small network where everything is powered on simultaneously and the client often boots before the dhcp server. I am trying to figure out how to configure dhcpcd to wait more than a couple seconds for a server before selecting a static fallback profile. Is this possible?

I have tried a simple 'timeout 180' near the top of dhcpcd.conf but this doesn't seem to have any effect.

I think the relevant debug logs are here:
...
Oct 17 17:40:14 [418]: enp1s0: soliciting a DHCP lease
Oct 17 17:40:14 [418]: enp1s0: sending DISCOVER (xid 0xe8f336a0), next in 3.7 seconds
Oct 17 17:40:14 [418]: enp1s0: soliciting an IPv6 router
Oct 17 17:40:14 [418]: enp1s0: delaying Router Solicitation for LL address
Oct 17 17:40:15 [418]: enp1s0: sending Router Solicitation
Oct 17 17:40:18 [418]: enp1s0: sending DISCOVER (xid 0xe8f336a0), next in 7.8 seconds
Oct 17 17:40:19 [418]: enp1s0: selected profile static_enp1s0
...

Seems like dhcpcd selects the static profile rather quickly after not getting a response from a server.

Hoping I'm missing something simple here.

This is controlled by the reboot timeout which has a default of 5 seconds.

>  everything is powered on simultaneously

If that's the case why bother with a static profile? dhcpcd will poll ad infinitum to get a DHCP lease by default.

Roy

Follow-Ups:
Re: Possible to wait for dhcp server before falling back?Jesse Meade-Clift
References:
Possible to wait for dhcp server before falling back?Jesse Meade-Clift
Archive administrator: postmaster@marples.name