<html style="direction: ltr;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0.2cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="UTF-8" text="#000000"
bgcolor="#FFFFFF">
On 12/27/2011 10:35 AM, Robert Wallner wrote:
<blockquote
cite="mid:CAJC-OR_A5wFcpB1yfRewkf9nbhDRH=DSVT8gNx1Vb9UDv3MTfg@mail.gmail.com"
type="cite">
<pre wrap="">I thought about that, but, if the dhcp server looses the leases file
(/var/lib/dhcp/dhcpd.leases), everything will be out of sync.
The only authority should be the list in the database.</pre>
</blockquote>
Then, by all means, generate a static allocation file from the
database, just don't bother with reloading the server. If the lease
file is lost (how, exactly?) then that would, within reason, be
accompanied by a server restart.<br>
<br>
As long as your server does not have an uptime of over 28 years,
you're gold.<br>
<br>
Shachar<br>
<blockquote
cite="mid:CAJC-OR_A5wFcpB1yfRewkf9nbhDRH=DSVT8gNx1Vb9UDv3MTfg@mail.gmail.com"
type="cite">
<pre wrap="">
On Tue, Dec 27, 2011 at 10:20 AM, shimi <a class="moz-txt-link-rfc2396E" href="mailto:linux-il@shimi.net"><linux-il@shimi.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, Dec 27, 2011 at 9:56 AM, Robert Wallner <a class="moz-txt-link-rfc2396E" href="mailto:kodixos@gmail.com"><kodixos@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
In a DHCP server setup, I have 2 requirements:
1. Each client's mac address must be recorded in a database together
with the IP address assigned.
2. Every new assigned IP address must be given from now on to the same
mac address only, and to nobody else.
The first one is easy, I use the on-submit event handler to run an
external program to insert the mac address in the database.
I have problems with the second one. The same external program scans
the database, and generates a config file for the DHCP server that is
included from the main config file, and contains "fixed-address"
entries for all the mac addresses. The problem is how I make the
server reload it's configuration files, from it's own "on-submit"
event handler??
Or am I completely in the wrong direction?
</pre>
</blockquote>
<pre wrap="">
Couldn't both requirements be solved[*] by using:
default-lease-time infinite;
max-lease-time infinite;
min-lease-time infinite;
in dhcpd.conf ?
-- Shimi
[*] I tried answering myself, and found [1] which claims the lease will hold
for 914M seconds [per a sniffer]. From some reason he believes that would be
14.4 years. My Kcalc said 914M/(86400*365) is actually 28.98 years...
Wouldn't we have to worry about Bug 2038 first?
[1] <a class="moz-txt-link-freetext" href="https://lists.isc.org/pipermail/dhcp-users/2009-February/008040.html">https://lists.isc.org/pipermail/dhcp-users/2009-February/008040.html</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>