<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 10:35 AM, Robert Wallner <span dir="ltr"><<a href="mailto:kodixos@gmail.com">kodixos@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I thought about that, but, if the dhcp server looses the leases file<br>
(/var/lib/dhcp/dhcpd.leases), everything will be out of sync.<br>
The only authority should be the list in the database.<br></blockquote><div><br></div><div>the only programmatic way of telling dhcpd what to do is using omapi (omshell for example).</div><div><br></div><div>if you store the data externally, you could always rebuild it using an external script or something, using omapi, does not require a restart or such.</div>
<div><br></div><div>however, it sounds to me like you are really trying to solve another problem, what exactly is the bigger scope problem? if its a server subnet, maybe you want to ensure that the dhcp reservations are set prior to the machine connecting the network?</div>
<div><br></div><div>Ohad </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On Tue, Dec 27, <a href="tel:2011" value="+9722011">2011</a> at 10:20 AM, shimi <<a href="mailto:linux-il@shimi.net">linux-il@shimi.net</a>> wrote:<br>
> On Tue, Dec 27, <a href="tel:2011" value="+9722011">2011</a> at 9:56 AM, Robert Wallner <<a href="mailto:kodixos@gmail.com">kodixos@gmail.com</a>> wrote:<br>
>><br>
>> In a DHCP server setup, I have 2 requirements:<br>
>><br>
>> 1. Each client's mac address must be recorded in a database together<br>
>> with the IP address assigned.<br>
>> 2. Every new assigned IP address must be given from now on to the same<br>
>> mac address only, and to nobody else.<br>
>><br>
>> The first one is easy, I use the on-submit event handler to run an<br>
>> external program to insert the mac address in the database.<br>
>> I have problems with the second one. The same external program scans<br>
>> the database, and generates a config file for the DHCP server that is<br>
>> included from the main config file, and contains "fixed-address"<br>
>> entries for all the mac addresses. The problem is how I make the<br>
>> server reload it's configuration files, from it's own "on-submit"<br>
>> event handler??<br>
>><br>
>> Or am I completely in the wrong direction?<br>
>><br>
><br>
><br>
> Couldn't both requirements be solved[*] by using:<br>
><br>
> default-lease-time infinite;<br>
> max-lease-time infinite;<br>
> min-lease-time infinite;<br>
><br>
> in dhcpd.conf ?<br>
><br>
> -- Shimi<br>
><br>
> [*] I tried answering myself, and found [1] which claims the lease will hold<br>
> for 914M seconds [per a sniffer]. From some reason he believes that would be<br>
> 14.4 years. My Kcalc said 914M/(86400*365) is actually <a href="tel:28.98" value="+9722898">28.98</a> years...<br>
> Wouldn't we have to worry about Bug <a href="tel:2038" value="+9722038">2038</a> first?<br>
><br>
> [1] <a href="https://lists.isc.org/pipermail/dhcp-users/2009-February/008040.html" target="_blank">https://lists.isc.org/pipermail/dhcp-users/2009-February/008040.html</a><br>
<br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
Robert Wallner<br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</div></div></blockquote></div><br></div>