Extending a lease when dhcp server is offline (similar to lastleaseextend)
Matthew Clarkson
Fri Aug 28 01:05:56 2020
Hello,
We are looking at using this dhcpcd project as the dhcp client in a new product, and we are trying to match the behaviour of an older client in an older product. The version we are looking at is 8.1.9.
The specific case we are looking at is when the dhcp server goes offline. We would like to see the device attempt to rediscover and if the server doesn't respond then bind to the previous address for a short period of time, and repeat until the server is back.
As I understand, this is similar to -lastleaseextend except that lastleaseextend is using the full lease time of the last received lease. The concern is that if the server is offline temporarily or moved, maybe to change the ip subnet, then it could take a long time for the device to resync.
As an example, if the device previously received a lease for 192.168.10.18 (leasetime 2 hours) and on the next rebind attempt the device would look like:
<server offline>
192.168.10.18 -> 255.255.255.255 DHCP Request
<no response>
0.0.0.0 -> 255.255.255.255 DHCP Discover
<no response>
<2 minutes later>
0.0.0.0 -> 255.255.255.255 DHCP Discover
<repeat>
Instead it looks like:
192.168.10.18 -> 255.255.255.255 DHCP Request
<no response>
<2 hour later>
0.0.0.0 -> 255.255.255.255 DHCP Request
Is there another option which will behave as we are expecting, or are there options to modify the behaviour of lastleaseextend (such as setting a shorter lease time for the extension)?
Thank you.
Archive administrator: postmaster@marples.name