If the lease files are lost what would be the solution?
Glenn.Satchell at uniq.com.au
Wed Apr 25 12:39:19 UTC 2007
If the dhcpd process is still running, then don't kill it. It will
write out it's in memory lease database approximately once per hour.
dhcpd only reads the lease file once, at startup, then keeps all the
information in memory.
If the process has stopped and there are no lease files then behaviour
is, as Frank said, a little painful.
If a new client boots then dhcpd will offer it an address. Before
offering it will try to ping that address, and will not offer it if it
finds a device using it. So assuming your clients respond to ping then
it will find a free IP address for them. Fortunately most clients will
request their old address when starting from cold, so the dhcpd process
can offer them the same one again.
IP addresses that are found to be in use will be marked as abandoned
and will not be offered to clients..
Clients that are renewing will effectively ask if they can keep using
the same address, and the server should agree to that. I am not sure
what the behaviour is if a client sends a renewal reqquest for an
address that is marked as abandoned. I think it should be ok though.
Once things settle down you will need to remove all the abandoned lease
records. This may take a few hours or a few days depending on the lease
time you offer.
Bottom line though, is that this is an inconvenience rather than a fatal
>From: "Frank Bulk" <frnkblk at iname.com>
>To: <dhcp-users at isc.org>
>Subject: RE: If the lease files are lost what would be the solution?
>Date: Wed, 25 Apr 2007 07:10:51 -0500
>I once accidentally deleted mine and had to re-create it (I used a Perl
>script to do so). I sourced the data from the router's ARP table and turned
>on ping-ahead. I obviously had some pain until my 50% of lease time arrive
>From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf
>Of S Kalyanasundaram
>Sent: Wednesday, April 25, 2007 2:56 AM
>To: dhcp-users at isc.org
>Subject: If the lease files are lost what would be the solution?
>The leases are stored in dhcpd.leases and backup is at dhcpd.leases~. For
>some reason these files are lost and dont have any kind of backup of them
>and again server got stopped. Say some hardware fault have come. We will
>have to restart the dhcpd server without the lease database.
>Does anyone faced this kind of situation. What would be the good suggestion
>for recovering this problem.
>The problem is, the existing client go for renewal and may be get a new IP
>address which breaks his (connection, download or whatever). The other case
>would be new clients have come up and ask for an IP and the server check for
>a free IP but which is already available and mark as abandon and give some
>new IP to the new client. When the original client goes for renewal of the
>IP but that is already marked as abandon. So after that i guess it will get
>a new IP address.
>I guess there would be some more scenarios.
>Anybody faced this kind of similar problem? Any suggestions are appreciated.
>Thanks in advance,
More information about the dhcp-users