How to setup internal DNS failover with BIND 9?

Posted on 2009-07-07
Last Modified: 2013-11-15
I have 2 low-power appliance servers running Ubuntu for DHCP and DNS services for my internal network. I've always had 2 in case of failure but today I decided to test the setup and it failed. All my clients are given two DNS server IPs when they grab an address via DHCP. Both of these servers are identical with the exception of one is a master for internal DNS names and the other holds slave records. All the master/slave functions are working just fine. There is no Active Directory here, FYI.

What I want to see happen si that when one of these servers drops offline, I want my clients to be able to resolve both internal and external DNS. As of right now that works just fine with the "master" because I have forwarders setup with my ISP. However, if I bring it down my clients cannot resolve internal or external names.

// This is the primary configuration file for the BIND DNS server named.


// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 

// structure of BIND configuration files in Debian, *BEFORE* you customize 

// this configuration file.


// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers

zone "." {

	type hint;

	file "/etc/bind/db.root";


// be authoritative for the localhost forward and reverse zones, and for

// broadcast zones as per RFC 1912

zone "localhost" {

	type master;

	file "/etc/bind/db.local";


zone "" {

	type master;

	file "/etc/bind/db.127";


zone "" {

	type master;

	file "/etc/bind/db.0";


zone "" {

	type master;

	file "/etc/bind/db.255";


include "/etc/bind/named.conf.local";

key rndc-key {

	algorithm hmac-md5;

	secret "xxxxxxxxxxxxx";


controls {

	inet port 953 allow {; } keys { rndc-key; };



options {

	directory "/var/cache/bind";

	// If there is a firewall between you and nameservers you want

	// to talk to, you might need to uncomment the query-source

	// directive below.  Previous versions of BIND always asked

	// questions using port 53, but BIND 8.1 and later use an unprivileged

	// port by default.

	// query-source address * port 53;

	// If your ISP provided one or more IP addresses for stable 

	// nameservers, you probably want to use them as forwarders.  

	// Uncomment the following block, and insert the addresses replacing 

	// the all-0's placeholder.

	// forwarders {


	// };

	auth-nxdomain no;    # conform to RFC1035

	forwarders {;;


	notify yes;

	allow-query {

		key intview; localhost;;


	allow-recursion {;



Open in new window

Question by:jasonsfa98
  • 3
  • 2

Accepted Solution

Point-In-Cyberspace earned 500 total points
ID: 24796677
With the two servers uop and running try to connect to the dns service on the slave.
In linux use dig and in windows use nslookup.
In this way you can exclude any slave issue not related to dns service config.


Author Comment

ID: 24796840
Used nslookup to diagnose second DNS server and it failed. Looked closer and found that there was no default gateway setup.


Thanks for showing me the path ...

Author Closing Comment

ID: 31600719
Sometimes an exact fix isn't needed, just a path to follow ...

Expert Comment

ID: 24807435
You're welcome. Btw you are right about the path to follow.


Author Comment

ID: 24808566
Redundant DNS and redundant DHCP .... awesome!

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most often confused topics in the area DNS is the idea of GLUE records. Specifically, what they are, when they are needed, when they are provided, and how they are created. First, WHAT IS GLUE? To understand GLUE, you must first under…
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now