Article

mwilmsen's picture
article
Reads:

2667

Score:
0
0
 
Comments:

1

Configuring a SLES DHCP Failover

Author Info

24 June 2010 - 5:09pm
Submitted by: mwilmsen

(View Disclaimer)

In most networks DHCP is one of the single-point-of-failures. If DHCP fails, 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.

For more technical blog articles on Novell and VMware look on blog.wilmsenit.nl


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

ucba's picture

A classic gotcha for this configuration is the firewall

Submitted by ucba on 7 February 2011 - 10:36pm.

If you are using a firewall on your DHCP servers, make sure you unblock the ports that the servers are taking to each other on. If they can't talk, they won't give out IP addresses.

© 2012 Novell