LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-11-2010, 09:40 PM   #1
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Smile Slave DNS Server - to act as fail over


Hi - im running two name servers using bind9 in my infrastructure. both are identical distros ubuntu 10.04.
Both are also receiving updates from each other, so no worries there.
The issue is, when the master name server goes down, the slave for some reason doesnt take over and act as a primary name server.
Can someone please help me on how to enable this feature using bind9?
What basically I want to happen is when the master server goes down, slave will take over the primary role till the master comes back online.

Cheers!
DB
 
Old 09-12-2010, 03:47 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,895

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Quote:
What basically I want to happen is when the master server goes down, slave will take over the primary role till the master comes back online.
This is the standard behavior of a slave dns.
Are you sure your slave does not answer queries for the domains it's authoritative for? How do you test it?
Bring the primary down and run:
Code:
dig +trace mydomain.com
If everything works as it should, you should get an answer in the last few lines from the secondary.
 
Old 09-12-2010, 10:43 AM   #3
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bathory View Post
This is the standard behavior of a slave dns.
Are you sure your slave does not answer queries for the domains it's authoritative for? How do you test it?
Bring the primary down and run:
Code:
dig +trace mydomain.com
If everything works as it should, you should get an answer in the last few lines from the secondary.
Thanks for your query.
Yes on dig +trace mydomain.com, i do in fact see these the line for the secondary server when I take down the primary. However while the primary is currently down, clients doesnt seem to get these dns entries from the secondary...when I do an nslookup in a client, it said "cant find host-name, non existent domain... server can't find entry: NXDOMAIN"

Not sure if related, but also cannot ping by just a single host while the primary is down (i.e. csaa-srv1 - specified host could not be found) but i can ping by the whole with the domain .com in there (i.e. csaa-srv1.csaa.com - ping reply ok!).

Ive also checked the secondary server's dns records within and seem to get all updated records (new serial) from primary.

Cheers,
DB

Last edited by deibertine; 09-12-2010 at 11:03 AM.
 
Old 09-12-2010, 11:34 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,895

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
If your clients are using the primary dns as a resolver, then this is normal.
For linux clients check /etc/resolv.conf and make sure you have both nameservers listed. For windows check the appropriate setting from network settings
Quote:
Not sure if related, but also cannot ping by just a single host while the primary is down (i.e. csaa-srv1 - specified host could not be found) but i can ping by the whole with the domain .com in there (i.e. csaa-srv1.csaa.com - ping reply ok!).
Again for linux clients check /etc/resolv.conf and make sure there is a "domain csaa.com", or a "search csaa.com", if you want to resolve hosts without the FQDN. For windows again check network settings

Regards
 
Old 09-12-2010, 11:51 AM   #5
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bathory View Post
If your clients are using the primary dns as a resolver, then this is normal.
For linux clients check /etc/resolv.conf and make sure you have both nameservers listed. For windows check the appropriate setting from network settings
Again for linux clients check /etc/resolv.conf and make sure there is a "domain csaa.com", or a "search csaa.com", if you want to resolve hosts without the FQDN. For windows again check network settings

Regards
Well the clients (linux/windows) are not statically assigned as far as their ip/dns parameters etc is concerned so meaning these clients are getting them automatically.

For linux clients' resolv.conf file, i only see the slave's ip address in the nameserver but not the master dns server's ip address eventhough these clients have been setup while the master dns server is online. Why is this?

Do i have to input the master's ip address in resolv.conf manually in each linux clients i have in my infrastructure?

Basically what I would like to happen is when the master dns server is down, clients should still be able to get their dns name resolver from the slave dns server as like the primary - also able to ping the single host with or without csaa.com

Is this possible?
 
Old 09-12-2010, 12:22 PM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,895

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
It's possible. In fact that should be the default behavior.
Since your clients are getting IP addresses through dhcp, you should configure the dhcpd server to provide them with the correct settings in /etc/resolv.conf.

Or you can setup /etc/resolv.conf in clients and configure the dhcp client in a way that /etc/resolv.conf is not overwritten by dhcp server settings. You should read client's documentation about this, because it's different from a distribution to another.
 
Old 09-15-2010, 12:57 PM   #7
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bathory View Post
It's possible. In fact that should be the default behavior.
Since your clients are getting IP addresses through dhcp, you should configure the dhcpd server to provide them with the correct settings in /etc/resolv.conf.

Or you can setup /etc/resolv.conf in clients and configure the dhcp client in a way that /etc/resolv.conf is not overwritten by dhcp server settings. You should read client's documentation about this, because it's different from a distribution to another.
Hmm, this is actually inputted in my dhcp server setting telling my clients to use both my master and slave dns server as name resolver.
So I guess the problem is why it isnt updating them in the client side?
Also to add, my dhcp server has a fail over server in house which has failover parameters set in their config files. Will that cause the replication per say? Cheers.
 
Old 09-15-2010, 04:22 PM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,895

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
I cannot tell about windows, but for the linux clients, you can check /etc/resolv.conf and see if both primary and secondary name servers are listed there.
 
  


Reply

Tags
bind9, dns, master, named, slave


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure master dns in windows2003 server and its slave dns in rhel5 suneellinux Linux - Newbie 1 04-11-2008 05:13 PM
setting up DNS slave server sumit dash Linux - Server 1 07-15-2007 12:51 AM
how too cinfigure the dns slave server sumit dash Linux - Server 1 07-14-2007 02:32 PM
Master/Slave server DNS emailssent Linux - Networking 2 10-04-2004 03:21 AM
Slave DNS server guntanis Linux - Networking 4 12-10-2003 09:02 AM


All times are GMT -5. The time now is 05:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration