dhcp-client and IPv4 lease times

Glenn Satchell glenn.satchell at uniq.com.au
Thu Dec 9 00:43:59 UTC 2021



On 2021-12-09 08:33, Simon wrote:
> Mike <the.lists at mgm51.com> wrote:
> 
>> From the environment passed to the script specified in dhclient4.conf, 
>> I
>> see, among others, the following variables:
>> 
>> new_dhcp_lease_time=45605
>> new_dhcp_rebinding_time=34805
>> new_dhcp_renewal_time=2405
>> 
>> 
>> In the log for the dhclient daemon I see the following entry 
>> (sanitized):
>> 
>> dhclient: ... -- renewal in 2121 seconds.
>> 
>> 
>> I have two questions:
>> 
>> 1) Why is the renewal time specified in the log different than any of
>> the renewal times passed in the environment?
>> 
>> 2) Why is not the renewal time taken to be half the lease time?
> 
> What lease time do you get ?
> The lease you get is probably nothing like any of the values you’ve
> set at the client end. You might need to do some packet capture on the
> interface to see what the server is sending to you.
> 
> Simon

Those settings are more like hints to the dhcp server about the settings 
you would like. The server configuration decides what values are used, 
and you don't really have much control over that.

regards,
Glenn


More information about the dhcp-users mailing list