DHCP failover lease balancing with nearly saturated pools

Jack Kielsmeier jackkiel at netins.net
Wed Jan 28 19:48:15 UTC 2009


I have two DHCP servers, running in failover mode. I am not using
failover in it's intended way. I basically have one server answer for
everything unless down.

When almost all the leases have been given out in a pool, I see balance
statements in the logs such as these:

Jan 28 13:10:25 dhcp-dsm dhcpd: [ID 702911 local5.info] balanced pool
14666c0 66.43.255/24  total 243  free 0  backup 1  lts 0  max-misbal 0

Currently, when the pools become nearly 100% saturated, the primary
server throws out 'peer holds all free leases' errors. This is correct
because the peer holds the final lease. Since I'm shipping all traffic
to the primary server, that last lease will never be given out.

Is there any way I can have it so that the last available lease is in
the free (primary) pool and not in the backup (secondary) pool?

I do know that I should have my pools expanded so I'm never in the
situation I describe above, but it still would be nice to have it
configured in such a way that all the leases will be used.

Here are the failover sections of my dhcpd.conf files:

Primary:

failover peer "dhcp-failover" {
  primary;
  address 10.0.100.34;
  port 520;
  peer address 10.0.100.35;
  peer port 520;
  max-response-delay 0;
  max-unacked-updates 10;
  load balance max seconds 0;
  mclt 1800;
  split 255;
  max-lease-misbalance 2;
  max-lease-ownership 1;
  min-balance 300;
  max-balance 1800;
}

Secondary:

failover peer "dhcp-failover" {
  secondary;
  address 10.0.100.35;
  port 520;
  peer address 10.0.100.34;
  peer port 520;
  max-response-delay 0;
  max-unacked-updates 10;
  load balance max seconds 0;
  max-lease-misbalance 2;
  max-lease-ownership 1;
  min-balance 300;
  max-balance 1800;
}

Again, I realize I'm not using failover in it's intended fashion. And if
this isn't possible I'd understand. I'd like to still keep roughly a
50/50 split of non-used leases but have the final non-used lease belong
to the primary server every time. Is this possible?

Thanks,
-- 
Jack Kielsmeier <jackkiel at netins.net>




More information about the dhcp-users mailing list