Re: NetReg: Deleting Leases

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Keith Woodworth (kwoody@citytel.net)
Date: Thu Jul 08 2004 - 16:22:32 CDT


On Thu, 8 Jul 2004, Tim Tyler wrote:

|-> Jeff,
|-> Ok, I am interested in this topic as well. I used your script and it
|->seems that it may be working fine. I need a couple clarifications though.
|->1. Removing leases is one thing, but forcing new registrations is
|->another. Do I need to manually delete entries at the bottom of dhcpd.conf
|->in order to force new registrations (dhcpd.conf.new,
|->dhcpd.conf.bak)? While your script seems to handle dhcpd.leases, its not
|->clear how one should handle dhcpd.conf.

Ive been playing around with the netreg dhcpd.conf.* stuff now for the
last few days as we get some new stuff online.

Ive got one fellow who got a .255 address from a new pool I just added. I
foo-bar'd the range and as a workaround gave him a static declaration from
outside the range, but still on the subnet. Dhcpd complained but it
worked.

Now Ive setup two ranges to exclude that one address, removed the static
declaration and we'll see what happens when he gets home. I'm guessing it
should NAK the static IP lease I assigned him and force him to re-register
as he is no longer a 'known MAC'.

On one of our DHCP servers, using 2.0 something I run a cleanlease perl
script over the dhcpd.leases file once in a while. Last time was, it looks
like, Oct 2003. I clean out the abandoned leases with the script. I just
checked the other day and there is 82 leases that need to be cleaned out.

|->2. While I presume that the input file is
|->/var/state/dhcp/dhcpd.leases what is the output file for? Is that what I
|->should use to over write dhcpd.leases?

w/o looking at the script I'd say the output is the file is now been
stripped of anything that you dont want in the leases file.

|->
|->3. Should dhcpd deamon be shut down while running this script?

What I do is backup the current leases file, stop dhcpd, run the script
over the lease file then copy the output file over the current
dhcpd.leases. Restart server.

Thats my little .02 cents on what happens in our little DHCP world anyway.

**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************


New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:46 CDT