SUSE Conversations


Configuring a SLES DHCP Failover



By: mwilmsen

June 24, 2010 6:09 pm

Reads:860

Comments:1

Rating:0

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

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Tags: , ,
Categories: SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (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.

1 Comment

  1. By:ucba

    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.

Comment

RSS