<div dir="ltr">Thanks for the clarification. After reading your reply, I also found the following past thread which has more details.<div> <div><h1>how dhcp-server select a ip-address to client?<br></h1><div><div><a href="https://lists.isc.org/pipermail/dhcp-users/2012-March/015052.html" target="_blank">https://lists.isc.org/<wbr>pipermail/dhcp-users/2012-<wbr>March/015052.html</a><br></div><div><br></div><div>Best,</div><div><br></div><div>Schilling</div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 15, 2017 at 3:25 AM, Glenn Satchell <span dir="ltr"><<a href="mailto:glenn.satchell@uniq.com.au" target="_blank">glenn.satchell@uniq.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The dhcp RFCs state that a DHCP server must try hard to return the IP<br>
address a client previously used. So when the leases file is periodically<br>
re-written the newest lease for each IP address is retained.<br>
<br>
If required, the DHCP server will hand those IPs out to a new client if<br>
there are no other free leases available.<br>
<br>
All it indicates is that you have enough free IP addresses in the dynamic<br>
ranges so the server has not needed to use those old ones.<br>
<br>
I guess you could clean them out if you knew (or didn't care) if that<br>
client was coming back. In that case, stop the dhcp server, modify the<br>
leases file, then start it up again. I imagine you would want a script to<br>
do the editting quickly.<br>
<br>
regards,<br>
-glenn<br>
<br>
<br>
On Fri, December 15, 2017 5:22 pm, Bill Shirley wrote:<br>
> What "cleaning" do you expect?  If those addresses are still defined in<br>
<div class="HOEnZb"><div class="h5">> dhcpd.conf<br>
> the DHCPD will keep track of them no matter when they were last used.<br>
><br>
> Bill<br>
><br>
><br>
> On 12/14/2017 4:04 PM, schilling wrote:<br>
>> When DHCPD write lease from memory to disk, there is no cleaning done?<br>
>> Or I am missing a configuration flag for that?<br>
>><br>
>> We have one pair of DHCP servers which have been migrated several times<br>
>> to new pairs over the years. Currently running on<br>
>> RHEL7 with DHCP 4.2.5. We recently found out that there are a lot of<br>
>> expired leases from several years ago are still in the<br>
>> lease file. For example, there are about 2 millions leases in the file,<br>
>> but 32K leases have lease ends times in 2014, 2015,<br>
>> and 2016.<br>
>><br>
>> We had database out of sync from secondary to primary issue, namely,<br>
>> both member is claiming the other member is holding all<br>
>> the free leases. It will get fixed after "faulting the database"<br>
>> <a href="https://kb.isc.org/article/AA-00609/0/How-do-I-resynchronize-a-failover-pair.html" rel="noreferrer" target="_blank">https://kb.isc.org/article/AA-<wbr>00609/0/How-do-I-<wbr>resynchronize-a-failover-pair.<wbr>html</a>.<br>
>> We are suspecting these leases might<br>
>> contribute to the issue.<br>
>><br>
>> Best,<br>
>><br>
>> Schilling<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> dhcp-users mailing list<br>
>> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
><br>
> ______________________________<wbr>_________________<br>
> dhcp-users mailing list<br>
> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
</div></div></blockquote></div><br></div>