dhcpcd-discuss

Re: Extending a lease when dhcp server is offline (similar to lastleaseextend)

Roy Marples

Sun Aug 30 09:24:31 2020

Hi Matthew

On 28/08/2020 20:59, Matthew Clarkson wrote:
With this info, I looked into this a bit more. Looks like there are periodic, directed requests starting at 1/2 the original lease time. Then at about 87% of the original lease time there are broadcast requests. It would be nice to be able to shorten the time until the broadcasts.

The current behaviour is actually:
192.168.10.18 -> 255.255.255.255 DHCP Request
<no response>
<1 hour later (1/2 lease time)>
192.168.10.18 -> server IP DHCP request
<repeat until 87.5% of lease time>
192.168.10.18 -> 255.255.255.255 DHCP request
<full lease time later>
0.0.0.0 -> 255.255.255.255 DHCP Request

I have attached a pcap file showing this with:
- the server at MAC 00:24:1d:7d:60:74 (lease time is configured to be 10 minutes)
- the client running dhcpcd at MAC 00:02:d9:1f:ff:ff

I think I have this issue fixed here:
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=4505b767ef2a91d0889b2e586d2f47688fe989d7

From the version you have, these patches are also applicable:
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=f021b552b5c53cfa785bc5f8df1c97fa8ffa9b86
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=3ce2165cf3934267a28d79bbb9e1bde2e3e4462a

I don't actively support dhcpcd-8 beyond security fixes and I know the last commit above won't apply, but it should be easy for you to work out.

Roy

Follow-Ups:
Re: Extending a lease when dhcp server is offline (similar to lastleaseextend)Roy Marples
References:
Extending a lease when dhcp server is offline (similar to lastleaseextend)Matthew Clarkson
Re: Extending a lease when dhcp server is offline (similar to lastleaseextend)Roy Marples
RE: Extending a lease when dhcp server is offline (similar to lastleaseextend)Matthew Clarkson
Archive administrator: postmaster@marples.name