*** From dhcp-server -- To unsubscribe, see the end of
this message. ***
Hi,
> -----Original Message-----
> From: dhcp-server-bounce isc.org
[mailto:dhcp-server-bounce isc.org]
On
> Behalf Of Mike Horn
> Sent: Thursday, March 02, 2006 10:53 AM
> To: dhcp-server isc.org
> Subject: Clear individual DHCP lease?
>
> *** From dhcp-server -- To unsubscribe, see the end
of this
message.
> ***
>
> Hi all,
> I'm relatively new to the ISC DHCP server
implementation and I was
> wondering
> if there was a way to clear an assigned lease,
preferably by supplying
the
> IP address of the client. Thanks!
Geez, I subscribed to this list just so I could send in a
patch, which I
never did (until now). :-/
Anyway, with this micro-patchlet applied, you can use OMAPI,
look up a
lease, and clear it by setting the state to 'free'.
Granted, you need
to understand the implications of freeing a lease this way;
AFAIK,
there's no way for the server to send an un-looked-for
message that it's
lease has been expired, please get a new one.
I created this patch when I ran out of 3-week leases in a
building that
was getting a lot of passing-through traffic; I checked
router ARP
tables, and freed the leases of any machine not appearing
there. Of
course, I had already shorted the default & max lease
times for that
subnet. This worked like well for me; it would have been
much uglier
w/o OMAPI.
How to use OMAPI is, of course, beyond the scope of this
e-mail. There
are some fine man pages, tho - man omapi, man dhcpd.
Another way to skin this cat would be to write a script,
probably perl,
that will read the dhcpd.leases file and spit out a new one
with the
proper entries deleted. Then stop dhcpd, run the script,
and restart.
Regards,
David
>
> -mike
>
>
>
>
>
>
------------------------------------------------------------
-----------
> List Archives : http://www.isc.org/ops/
lists/
> Unsubscribe : http://www.
isc.org/sw/dhcp/dhcp-lists.php
> -or- : mailto:dhcp-server-request isc.org?Subject=unsubscribe
>
------------------------------------------------------------
-----------
------------------------------------------------------------
-----------
List Archives : http://www.isc.org/ops/
lists/
Unsubscribe : http://www.
isc.org/sw/dhcp/dhcp-lists.php
-or- : mailto:dhcp-server-request isc.org?Subject=unsubscribe
------------------------------------------------------------
-----------
|