Failover Dynamic DNS (BIND and DHCP)

Article Index
Failover Dynamic DNS (BIND and DHCP)
Setup the master DNS
Setup the DHCP slave
Setup DNS slave
All Pages

If a machine uses a dynamic ip-address retrieved from a DHCP server the ip-address will not resolve to it's domainname. Usually we setup DNS with static ip-addresses. However we can setup a dynamic DNS server with DHCP so every machine which retrieves its ip-address from the DHCP server will be registered or updated in the DNS. In this tutorial I will setup a failover. We need to install some packages if they are not already installed:

yum install ntp dhcp bind bind-chroot bind-libs bind-utils

Let's assume the domainname is, the network is 192.168.1/0/24, Gateway, the DHCP servers and DNS servers are and

For a failover DHCP setup both servers should have the time in sync. Therefore we create a simple cron-job on both servers to sync the time every day with a time-server. Create the file /etc/cron.daily/timesync and add the lines

On the master server ( edit /etc/dhcpd.conf
option domain-name "";
option domain-name-servers,;
option netbios-name-servers;
ddns-update-style interim;
ddns-updates on;
ddns-domainname "";

key rndckey {
algorithm hmac-md5;
secret "your key from /etc/rndc.key";

key rndckey;

key rndckey;

failover peer "failover" {
port 647;
peer address;
peer port 647;
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
split 128;
load balance max seconds 3;
subnet netmask
pool {
failover peer "failover";
option dhcp-server-identifier;
option domain-name-servers;
option subnet-mask;
option broadcast-address;

default-lease-time 43200;
max-lease-time 43200;
option domain-name "";
option routers;
deny dynamic bootp clients;
allow unknown-clients;
ignore client-updates;


Please login first before adding a comment.


You are here: Home Howtos and FAQs DNS Failover Dynamic DNS (BIND and DHCP)