dhcp-client and IPv4 lease times

Bob Harold rharolde at umich.edu
Fri Dec 10 18:23:14 UTC 2021


On Fri, Dec 10, 2021 at 12:06 PM Mike <the.lists at mgm51.com> wrote:

> On 12/8/2021 7:43 PM, Glenn Satchell wrote:
> >
> >
> > 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.
>
> I understand that.  I've noticed that the lease length hint usually work
> when it is shorter than what the ISP will provide, but it does not work
> when it  is longer.
>
> Thanks for the reply.
>


Are you setting all three?
min-lease-time
default-lease-time
max-lease time

I set all three the same.  I have seen others set them to different values,
and then the client can request a time somewhere between min and max, or
just take the default.

-- 
Bob Harold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20211210/89f2c2b5/attachment.htm>


More information about the dhcp-users mailing list