Dhcp failover mechanism

Jack Kielsmeier jackkiel at netins.net
Tue May 26 19:27:16 UTC 2009


> On Mon, May 25, 2009 at 11:18:12AM -0400, Carlos Dias wrote:
> > Hi,
> > 
> > Yes I did, but what i'm trying to do is find a way to prevent load
> > balancing and do only failover.
> > 
> > That's wy i wondered if anoyone else modified those values.
> 
> "split" is necessary to split the pool between the primary server and 
> the backup server.  Modifying "split" will not prevent the backup 
> server from answering.  You might try setting "load balance max 
> seconds" really high, but I still don't think it will do what you 
> want.  Basically, the ISC server isn't designed for fail-only without 
> load balancing.

Unless this changed in version 4, this statement is not entirely correct.

The split value is used to determine how even you want to split the DHCP
load between the servers (not the leases).

A split value of 128 splits dhcp replies evenly, 255 makes the primary
answer 'most' requests and 0 makes the failover answer most requests.

I say 'most' because I have noticed that once in a blue moon , even with
a split of 255, the failover will answer.

To get around this, instead of split, I use:

  hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
  ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff;

I am basically doing what you are attempting to do. We have a primary
server that answers everything unless down, then the secondary takes
over.

We do it this way because our DHCP servers are behind a load balancing
switch, separated by a distance of 60 miles. It's just much more easy to
have one be the 'active' and one be the 'standby' with our LBS equipment.

You'll also want to set the following options:

  max-lease-misbalance 2;
  max-lease-ownership 1;
  min-balance 300;
  max-balance 1800;

the max-lease stuff makes it so the unused leases are 'pretty much'
evenly split between servers. You want the free leases split evenly in
case one server goes down. If one server owns all the leases, having a
failover is useless (unless you put the working server into the
partner-down state, but that requires manual intervention). If you want
a more detailed description of what these statements do, the man page of
dhcpd.conf has a couple of paragraphs describing these statements.

The min-balance statement is very important. With one server handing out
all the leases, DHCPD will try to re-balance the free leases extremely
often (especially if you have a lot of DHCP traffic). A min-balance of
300 seconds means it'll wait at least 5 minutes to re-balance free
leases between servers. Before I had this in my config, the log files
were just flooded with lease balancing. We haven't noticed any issues
when setting this to 5 minutes.

The max balance is not needed, but I have it in my config just for the
heck of it.

I hope this answers your questions.

Jack Kielsmeier <jackkiel at netins.net>
netINS Systems Administrator
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 





More information about the dhcp-users mailing list