dhcpcd icon indicating copy to clipboard operation
dhcpcd copied to clipboard

backoff-cutoff time; equivalant in dhcpcd.conf

Open Vishwasrao1 opened this issue 1 year ago • 3 comments

We have recently shifted to dhcpcd from dhclient, I want to set backoff-cutoff time to some custom value, I can not find that option in dhcpcd. any idea what the equivalent of "backoff-cutoff time" in dhcpcd?

Vishwasrao1 avatar Nov 14 '24 15:11 Vishwasrao1

That isn't a configurable in dhcpcd. It's hardcoded at 64 seconds as per RFC2131. This is a should though, so it can be changed.

If I might ask, why do you want this and what value would you be using?

rsmarples avatar Nov 15 '24 09:11 rsmarples

Hello @rsmarples,

Thank you for your response. We have a customer requirement that states:

In case the DHCP server does not respond to the request, the DHCP client shall use the retransmission algorithm recommended in RFC 2131. In order to speed up the start-up of the device, it is necessary to reduce the back-off times specified in RFC 2131. The maximum back-off time shall be 4 seconds. Preferably, the back-off time shall be fixed (1 – 4 seconds).

Could you please direct me to the source code where this is hardcoded? This will allow us to make it configurable. I will send you a PR afterwards.

Vishwasrao1 avatar Nov 15 '24 09:11 Vishwasrao1

https://github.com/NetworkConfiguration/dhcpcd/blob/master/src/dhcp.c#L1859

rsmarples avatar Nov 15 '24 09:11 rsmarples