Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. Re: Latest lease entry not the one offered to the client (Klemen Sladic) ---------------------------------------------------------------------- Message: 1 Date: Wed, 9 Sep 2020 11:51:21 +1200 From: Klemen Sladic <gostur...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Latest lease entry not the one offered to the client Message-ID: <can6euag17i7n91olza_pevnuvjhnbafae34n+zkys_lnvi6...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Thank you very much Niall. Your explanation is very useful and answered my open questions. I made a shell script that parses the file to do what I need. Regards, Klemen On Wed, Aug 26, 2020 at 9:59 PM Niall O'Reilly <niall.orei...@ucd.ie> wrote: > I haven't seen follow-up to this yet, so here is my tuppence-worth. > > On 18 Aug 2020, at 4:07, ksladic wrote: > > Regarding lease file cleanup: > 1. Does it remove all expired leases? > > No, because removing them would not be consistence with the > service definition <https://tools.ietf.org/html/rfc2131#section-2.2>: > > "The > allocation mechanism (the collection of DHCP servers) guarantees not > to reallocate that address within the requested time and > > *attempts to return the same network address each time the client requests > an address*." (My emphasis) > > This means that an expired lease should be retained for use in case the > client ever requests it again. > > > 1. Does it remove duplicate leases ... keeping only last valid one? > > Yes, but a lease is identified for this purpose by its IP address, > not by any property of the client, such as MAC address or UUID, > or so I recall. > > It follows that an expired lease which, because of depletion of the > lease pool, is assigned to a different client, may lose its association > with an earlier client. > > > 1. In general (before or after lease file cleanup) if I would like to > find the latest valid leased IP for a client, is it best to go through > whole file and pick valid lease with latest timestamp? Because as I > understand I can not rely on the order of leases in the file. > > It's easy but tedious to write a script to do this. I may have one which > was > once in production in some backup somewhere, but you can probably code one > faster than I could find it again. > > I hope this helps. > > Niall O'Reilly > _______________________________________________ > ISC funds the development of this software with paid support > subscriptions. Contact us at https://www.isc.org/contact/ for more > information. > > dhcp-users mailing list > dhcp-users@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/20200909/320c514b/attachment-0001.htm> ------------------------------ Subject: Digest Footer _______________________________________________ ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 143, Issue 3 ******************************************