DHCP HA Setup on CentOS/RHEL 7.x

On primary server

#dhcpd.conf

authoritative;
option domain-name "subdomain.domain.tld";
option domain-name-servers 8.8.8.8, 8.8.4.4;

default-lease-time 600;
max-lease-time 7200;

# fail over configuration

failover peer "dhcp02" {
    primary; # This is the primary
    address 192.168.1.103; # This DHCP Server IP Address
    port 647;
    peer address 192.168.1.104; # Secondary DHCP Server ip address
    peer port 647;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
    mclt 3600;
    split 128;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
    option domain-name "subdomain.domain.tld";
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
    pool {
        failover peer "dhcp02";
        range 192.168.1.150 192.168.1.250;
        default-lease-time 6000;
        max-lease-time 72000;
    }
}

On secondary server

#dhcpd.conf

authoritative;
option domain-name "subdomain.domain.tld";
option domain-name-servers 8.8.8.8, 8.8.4.4;

default-lease-time 600;
max-lease-time 7200;

# fail over configuration

failover peer "dhcp02" {
    secondary; # This is the secondary
    address 192.168.1.104; # This DHCP Server IP Address
    port 647;
    peer address 192.168.1.103; # Primary DHCP Server ip address
    peer port 647;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
    option domain-name "subdomain.domain.tld";
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.1;
    pool {
        failover peer "dhcp02";
        range 192.168.1.150 192.168.1.250;
        default-lease-time 6000;
        max-lease-time 72000;
    }
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s