Configuring a SLES DHCP failover

In most networks DHCP is one of the single-point-of-failures. If DHCP failes, every devices relying on DHCP cannot function.

In order to  provide a high availability to your DHCP server, set up a backup DHCP server running the same Linux distribution and version, as follows:

  1. Stop DHCP on both DHCP servers (rcdhcpd stop).
  2. On your primary DHCP server, add lines to the /etc/dhcpd.conf file, similar to following example:
    failover peer "dhcp" {
       primary;
       address 192.168.1.10;          # local host IP address
       port 647;                      # make sure this port is not used by other
                                        programs
       peer address 192.168.1.11;     # backup host IP address
       peer port 647;
       max-response-delay 60;
       max-unacked-updates 10;
       mclt 600;
       split 128;
       load balance max seconds 3;
    }
    include "/etc/dhcpd.master";

    On your backup DHCP server, add lines to the /etc/dhcpd.conf file, similar to following example:

    failover peer "dhcp" {
       secondary;
       address 192.168.1.11;         # local host IP address
       port 647;                     # make sure this port is not used by other
                                       programs
       peer address 192.168.1.10;    # primary host IP address
       peer port 647;
       max-response-delay 60;
       max-unacked-updates 10;
    }
    include "/etc/dhcpd.master";
  3. Add the following lines to the end of /etc/dhcpd.master on both DHCP servers. On SUSE Linux Enterprise Server, copy this file to /var/lib/dhcp/etc.
    subnet 192.168.1.0 netmask 255.255.255.0 {
      pool {
        failover peer "dhcp";
        range 192.168.1.100 192.168.1.200;
        deny dynamic bootp clients;
      }
      option routers 192.168.1.1;
    }
  4. Start DHCP on both DHCP servers (rcdhcpd start.

After these configurations are complete, the primary DHCP server, which is usually a management server or install server, responds to DHCP client requests. If the primary DHCP server goes offline, the backup DHCP server automatically takes its place and provides DHCP service.

About Michael
Michael Wilmsen is a VMware training/consultant (no specific order) with more than 15 years in the IT industry. Main focus is VMware vSphere, Horizon View and Site Recovery Manager with a deepdive to performance. Michael is VCDX 210, VCAP 4/5 certified, has been rewarded with the vExpert title from 2011, is a PernixPro, Nutanix Tech Champion and a Nutanix Platform Professional.

4 Comments to “Configuring a SLES DHCP failover”

  1. By dkrotil, June 25, 2010 @ 18:16

    How about OES2 server, where is DHCP eDirectory enabled and some configurations are in eDir.

    • By Mike, June 28, 2010 @ 12:47

      Than you will use normal Novell Clustering Services for DHCP. A 2 node cluster is free with OES2

  2. By dkrotil, June 25, 2010 @ 18:16

    How about OES2 server, where is DHCP eDirectory enabled and some configurations are in eDir.

    • By Mike, June 28, 2010 @ 12:47

      Than you will use normal Novell Clustering Services for DHCP. A 2 node cluster is free with OES2

RSS feed for comments on this post. TrackBack URI

Leave a Reply

You must be logged in to post a comment.