DHCP Redundancy

Simon Hobson dhcp1 at thehobsons.co.uk
Sat Nov 27 20:05:35 UTC 2010


Soren Aalto wrote:

>We did that on our campus, and it didn't seem to work.  The one
>time we ran out of disk space on one of the DHCP servers, we just
>had machines start losing their leases & needing to be rebooted.

As Steinar says, if you run out of disk space, things are going to 
fail in messy ways.

>It's also a giant mess to maintain -- as any static assignments have
>to be put in the config files on both machines.

That's the case whichever method you use, but it's really no big 
deal. The trick is to use include statements for common parts of the 
config and then use whatever tools you prefer to sync the files from 
one machine to another. I do something similar at work with our DNS - 
I have a script that generate the configs for master and slaves, and 
then uses rsync to transfer the slave config to the slave servers.

If you hand edit the files then yes, it will be a pain - but managing 
two configs by hand is the wrong way to do it for anything but 
trivial setups.


Christ Schlacta wrote:
>Is there no database backend for leases?  I may be wrong, but I 
>think that would greatly simplify redundancy AND failover.

It's something that's been much talked about. The problem is going to 
be performance while maintaining RFC compliance. The RFCs **require** 
the server to commit leases to permanent storage before offering them 
to the client - in the current design that's done by appending a 
lease record to the leases file (and then telling the OS to sync the 
changes to disk) which is about the fastest operation you will get.
Once you add in a "proper" database, then you are at the mercy of 
that database for your response times - not forgetting that in it's 
current form, the program is (I believe) single threaded.


Dan Letkeman wrote:
>Do you know if there is any documentation for running them in failover mode?

man dhcpd.conf

>If I run them in a non-overlapping state, is there any way I can set
>them up so that the first one always answers first, and the second one
>always answers second?  Sort of there, but only if needed.  This way
>its there for the brief time needed to fix the first one, and the
>range doesn't need to be large on the second one.  And my monitoring
>system will notify me when the first dhcp server is not responding.

I think you probably want the min-secs declaration.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list