Lease File of RAM Disk

Simon Hobson dhcp1 at thehobsons.co.uk
Thu May 15 08:44:04 UTC 2014


A.L.M.Buxey at lboro.ac.uk wrote:

> have a process to copy the lease file to persistant storage - and have a system startup
> script to copy it to ramdisk.

Well as long as it copies the file periodically, not just on a server/process shutdown, then that will significantly reduce the problem. Just copying the file on shutdown is a bad idea - it won't get copied on power failure or server crash.


> if you're only doing linked/static leases or you really take the 'dynamic' part to heart 
> then losing all lease info isnt a problem - well, it is if your DHCP server isnt checking
> leases are in use before handing addresses out :-)

Actually, it's a big problem.
The server will start up with a blank sheet. It will start offering out leases that are already leased out - what happens next varies according to the particular combination of circumstances :

1) The device with that address isn't online at the time. A new device gets the address, you now have the address leased to two clients - and are dependent on the original one recognising this and "doing the right thing" when it comes back online.

2) The device with that address is online, but the server doesn't detect it - ping before offer is "less useful" now that so many systems default to not responding to pings. The device offered the lease now has to decline it - but the server will keep offering it. At the very least you'll fill your logs with DHCP Decline messages.

3) The server detects the address is in use - and marks it as abandoned. It will now no longer offer it except when it runs out of other candidates. It will in effect run with a much smaller pool which increases client address churn.

Of course, if having a network that "just works" and is fairly stable isn't a priority for you then these are not problems.


If only static leases - no it's not a problem, but then your leases file will be empty anyway.



More information about the dhcp-users mailing list