fixed-address leases in dhcpd.leases

Andrew Bell andrew at poscomp.ca
Mon Mar 30 16:16:49 UTC 2020


FWIW, YMMV, etc.

I wrote a database system many years ago (which is still in use) to handle
this.

In a nutshell, it tracks a list of reserved addresses by subnet, and dumps
out a config fragment containing the fixed address entries. Then it
generates the subnet pools by iterating through the subnet ranges and
skipping the fixed addresses.  So I get something like this:

host xxx { hardware ethernet xx.xx.xx.xx.xx.xx; fixed address 10.10.10.7; }
...
subnet 10.10.10.0 netmask 255.255.255.0 {
  pool {
    range 10.10.10.1 10.10.10.6;
    range 10.10.10.8 10.10.10.254;
  }
}

Obviously that's only a small fragment.

Whenever a change is made to the database the system regenerates the config
files and reloads the servers. Then it import/parse the dhcpd.leases file,
and put the last lease date in as a "last seen" attribute in the database.

Andrew

On Fri, Mar 27, 2020 at 3:21 PM Bob Harold <rharolde at umich.edu> wrote:

> +1
> I want to know when it last renewed its lease - recently, years ago, or
> never.
>
> --
> Bob Harold
>
>
>
> On Fri, Mar 27, 2020 at 2:46 PM Brennan,Andrew <andrew.brennan at drexel.edu>
> wrote:
>
>> I have wanted this for years - that lease entry would let me know whether
>> or not the machine is still configured to acquire it’s address via DHCP or
>> if the enduser has taken it upon themselves to manually configure the
>> host.  If this ends up as a feature request, I’m +1 here.
>>
>> andrew.
>>
>> > On Mar 27, 2020, at 2:35 PM, Nate Collins <ncollins at xes-inc.com> wrote:
>> >
>> > External.
>> >
>> > Hello,
>> >
>> > Is there a setting that controls whether or not fixed-address leases
>> > in dhcpd.conf will get added to the dhcpd.leases file? We have a
>> > use-case where we would like them to be, and they aren't on 4.3.3 (or
>> > we unknowingly have a setting preventing them from getting added). I
>> > took a look through the various manpages and didn't see anything
>> relevant.
>> >
>> > Thanks, Nate
>> > _______________________________________________
>> > dhcp-users mailing list
>> > dhcp-users at lists.isc.org
>> >
>> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isc.org%2Fmailman%2Flistinfo%2Fdhcp-users&data=02%7C01%7Candrew.brennan%40drexel.edu%7C9eed272971b14d28164408d7d27da854%7C3664e6fa47bd45a696708c4f080f8ca6%7C0%7C1%7C637209309455287580&sdata=3gXa4%2Bv5UEPNsi258bRY2z20UNcCFUB7JNA9fkALQTU%3D&reserved=0
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20200330/10cf48dc/attachment.htm>


More information about the dhcp-users mailing list