DHCP Failover and dhcpd.leases

"Küppers, Malte" M.Kueppers at douglas-informatik.de
Tue Apr 17 13:52:30 UTC 2012

Thanks a lot!
 I now have it fully functional with failover active. I initially had some issues with the leases db, but after wiping the one on the secondary server everthing works fine now.

On 04/16/12 16:29, "K?ppers, Malte" wrote:
> Hi there and thanks a lot for your replies!
> There are just some questions left:
> -I guess thats ok then, so I can safely enable failover mode without 
> losing leases?!


> -How long does it take until the leases files are synchronized and 
> equal on both servers? Until next update is pushed ?

As quickly as the leases can be copied over the network. FOr a small lease file it could be a few 10s of seconds, a large (few MB) might take a couple of minutes.

> -Will I have to start the second server with a copy of the leases file?
> Or does a blank file work fine? Because while testing, I ran into the 
> problem that if I wiped the leases files on both sides the both server 
> got stuck in some ?waiting for update? state an neither primary nor 
> secondary was handing out leases anymore. How can I wipe out the files 
> safely if needed?

No. Start existing server with existing lease file. Start new server with empty lease file. New server will request a lease update from the other server.

This is covered in the section titled FAILOVER STARTUP in the dhcpd.conf man page.

If you wipe the lease files on both sides then both servers go into a state where they will wait before issuing new leases. Generally this is a bad thing to do, so you shouldn't wipe both lease files in production. 
Even though the servers have no concept of any leases after wiping the lease files, all the clients *do* have leases, but the servers are now out of synch with the clients, so the servers wait for the current leases to expire before handing out new leases. If the two systems get out of synch with each other (network error where they can't communicate for example) you can pick one system with the "best" lease file, and wipe out the other one, but really it's best to avoid that and let the systems heal themselves.

It's best to arrange for syslog from your dhcp servers to go to the same host so you can see messages from both together.

The other thing you'll see which may seem odd is initially a new client will get a lease that is half of the MCLT setting. Next time it renews it will get the full lease time.


> Thanks in advance
> Regards
> Malte
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.

More information about the dhcp-users mailing list