ISC DHCP HA

With the ISC DHCP it is possible to setup two server to get a high available DHCP system. On Debian GNU/Linux (here wheezy 7.0) you need to install isc-dhcp-server.

/etc/dhcp/dhcpd.conf on server1

server-identifier server1.example.com;
failover peer "DHCP-HA" {
  primary;
  split 128;                    # load balancing threshold (should be 128)
  mclt 3600;                    # Maximum Client Lead Time
  address 10.0.0.1;
  port 519;
  peer address 10.0.0.2;
  peer port 519;        # connect to peer on this port
  max-response-delay 60;    # how many seconds to wait for answer from peer
  max-unacked-updates 10;   # how often to try to contact the failover peer
  load balance max seconds 3;   # a cutoff after which load balancing is disabled
}
include "/etc/dhcp/dhcpd.conf.shared";

/etc/dhcp/dhcpd.conf on server 2

server-identifier server2.example.com;
failover peer "DHCP-HA" {
  secondary;
  address 10.0.0.2;
  port 519;
  peer address 10.0.0.1;
  peer port 519;        # connect to peer on this port
  max-response-delay 60;    # how many seconds to wait for answer from peer
  max-unacked-updates 10;   # how often to try to contact the failover peer
  load balance max seconds 3;   # a cutoff after which load balancing is disabled
}
include "/etc/dhcp/dhcpd.conf.shared";

/etc/dhcp/dhcpd.conf.shared should be the same on both servers

authoritative;
ddns-update-style none;
ddns-updates off;
allow booting;
allow bootp;
option domain-name "example.com";
option domain-name-servers 10.0.0.1, 10.0.0.2;
option netbios-name-servers 10.0.0.1;
option netbios-node-type 2;
option netbios-scope "";
option routers 10.0.0.254;
# default 7 days
default-lease-time 604800;
# max 14 days
max-lease-time 1209600;
# TFTP server is OPSI to get machines installed by OPSI
next-server tftp.example.com;
filename "linux/pxelinux.0";
log-facility local7;
use-host-decl-names on;
#deny unknown-clients;

subnet 10.0.0.0 netmask 255.255.255.0 {
  pool {
    failover peer "DHCP-HA";
    deny dynamic bootp clients;
    # kein Range, nur registrierte Clients bekommen eine IP
    range 10.0.0.101 10.0.0.199;
    next-server tftp.example.com;
    filename "linux/pxelinux.0";
    host fixedhost { hardware ethernet f0:f1:f0:f2:f4:f2; fixed-address 10.0.0.100; }
  }
}