LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2010, 12:15 PM   #1
chrisgti
Member
 
Registered: Mar 2009
Posts: 58

Rep: Reputation: 15
BIND Slave Server - A few questions


I've added a secondary BIND nameserver for High Availability.

I did the basic zone adding via YaST in SuSE 11.2, and initially when testing with the secondary server it was showing as "UnKnown". I then added the reverse lookup zone as a slave but that still wasn't working - on investigation I realised that there was no PTR record for the secondary nameserver - so I added one:

ns1:/var/lib/named/slave # cat 192.168.1.rev
$ORIGIN .
$TTL 1W
1.168.192.in-addr.arpa IN SOA ns1.acme.com. root.ns1.acme.com. (
44
2D
4H
6W
1W )

NS ns1.acme.com.1.168.192.in-addr.arpa.
$ORIGIN 1.168.192.in-addr.arpa.
12 PTR ns2.acme.com
98 PTR ns1.acme.com

However I still got "UnKnown"

Internal and external lookups work ok - however I notice that there is no NS record for NS2 (but there is PTR as you can see and there is also an A record) - do I need to add "NS ns2.acme.com.1.168.192.in-addr.arpa." to the reverse lookup zone on the master?

As a test I changed the SOA and NS records to be ns2 instead of ns2...and then after restarting named i get presented with the server name instead of "UnKnown"

Should I ever be manually updating zone files on the slave, or should these always be done on the master?

And as an aside...

When I do nslookup from Windows on the Master server, I get:

Default Server: ns1.acme.com.1.168.192.in-addr.arpa

But on the Slave it's just "ns2.acme.com" (although since reverting back to a snapshot I now get the suffix too) Any particular reason why this is the case? Does it matter?

Thanks

Last edited by chrisgti; 01-18-2010 at 12:33 PM.
 
Old 01-18-2010, 01:04 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi

You have some missing trailing dots in your reverse zone file and you need to add also the slave dns. So, change it to:
Code:
$TTL 1W
$ORIGIN 1.168.192.in-addr.arpa.
@ SOA ns1.acme.com. root.ns1.acme.com. (
45
2D
4H
6W
1W )

 NS ns1.acme.com.
 NS ns2.acme.com.

12 PTR ns2.acme.com.
98 PTR ns1.acme.com.
You have to add an A record for ns2.acme.com in the forward zone file (if you haven't already done so).
Quote:
Should I ever be manually updating zone files on the slave, or should these always be done on the master?
This is done automatically if you setup correctly master and slaves, so master can notify slaves for changes.
Quote:
When I do nslookup from Windows on the Master server, I get:

Default Server: ns1.acme.com.1.168.192.in-addr.arpa

But on the Slave it's just "ns2.acme.com" (although since reverting back to a snapshot I now get the suffix too) Any particular reason why this is the case? Does it matter?
It doesn't matter, but there in reason to name your dns like ns1.acme.com.1.168.192.in-addr.arpa. Just ns1.acme.com is enough.
 
Old 01-19-2010, 03:40 AM   #3
chrisgti
Member
 
Registered: Mar 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Hi Bathory - Many thanks for your help, I think that has fixed it!

I reverted to a snapshot I took before I added the slave role to the server and before adding it again I made the necessary changes to the master zone forward and reverse zone files.

The master reverse zone file now looks like this:

ns1:/var/lib/named/master # cat 1.168.192.rev
$TTL 1W
@ IN SOA ns1.acme.com. root.ns1.acme.com. (
44
2D
4H
6W
1W )

IN NS ns1.acme.com.
IN NS ns2.acme.com.

98.1.168.192.in-addr.arpa. IN PTR ns1.acme.com.
12.1.168.192.in-addr.arpa. IN PTR ns2.acme.com.

And the slave automatically came through as this:


ns2:/var/lib/named/slave # cat 1.168.192.in-addr.arpa
$ORIGIN .
$TTL 1W
1.168.192.in-addr.arpa IN SOA ns1.acme.com. root.ns1.acme.com. (
44
2D
4H
6W
1W )

NS ns1.acme.com.
NS ns2.acme.com.
$ORIGIN 1.168.192.in-addr.arpa.
12 PTR ns2.acme.com.
98 PTR ns1.acme.com.

So...does that look OK?

I notice that the pointer records in the master show as "12.1.168.192.in-addr.arpa." whereas they are simply "12" in the sec - I think I made this change manually on the master as it wasn't working with just "12" in testing...I presume this isn't really a problem?

Also How come the Master has "IN NS" for example, while the slave just has "NS"

Finally...adding those trailing dots seems to have solved the issue of the name of the server shown when you type nslookup - it now just shows as "ns1.acme.com" and "ns2.acme.com" - so thanks for that.

Sorry for all the questions - this is fairly new stuff to me, but it's been an enjoyable learning experience.

What I want to do next is secure the transfers between the master and the slave...so back to the books.

Many thanks again.

Edit: I forgot one thing...when querying external sites I get "non-authoritative answer" - I can't remember if I got this before or not. Is this simply because it's coming from a server outside of it's own domain?

Last edited by chrisgti; 01-19-2010 at 04:06 AM.
 
Old 01-19-2010, 04:06 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

Yes, now it's OK
Quote:
I notice that the pointer records in the master show as "12.1.168.192.in-addr.arpa." whereas they are simply "12" in the sec - I think I made this change manually on the master as it wasn't working with just "12" in testing...I presume this isn't really a problem?
It's the same thing. If you use just plain 12 (without a trailing dot), then the ORIGIN value is attached to it, so it becomes 12.1.168.192.in-addr.arpa..
That was in fact and your problem. Without the trailing dots in your your ns records, the hostnames were actually ns1.acme.com.acme.com and ns2.acme.com.acme.com (ORIGIN was attached)
Quote:
Also How come the Master has "IN NS" for example, while the slave just has "NS"
IN is the default class in a resource record, so it can be omitted.

Regards
 
1 members found this post helpful.
Old 01-19-2010, 07:44 AM   #5
chrisgti
Member
 
Registered: Mar 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Many thanks, I think that answers all my questions!
 
Old 01-19-2010, 10:41 AM   #6
chrisgti
Member
 
Registered: Mar 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Actually - I do have one last question

looking at /etc/named.conf on the slave - it's not the same at all. Only the sections relevant to the zone files are there. The ACL I defined and also permissions for Zone Transfer, allow query etc are "any"

Do I just need to manually copy named.conf from the master to the slave to resolve this?
 
Old 01-19-2010, 04:07 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,581

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Don't copy named.conf from master to slave, because it's not going to work. Just copy the ACLs and other options you want.

Cheers
 
1 members found this post helpful.
Old 01-19-2010, 04:27 PM   #8
chrisgti
Member
 
Registered: Mar 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Will do! Thanks
 
  


Reply


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
Slave DNS server hangs during restart (Bind) marinko Linux - Networking 0 03-19-2009 07:54 PM
BIND Slave server never gets zone transfer from master. HELP!! quackking Linux - Networking 2 08-30-2006 01:54 PM
Slave can't bind with running NIS server rclancy Linux - Networking 0 02-23-2005 06:48 PM
BIND slave/secondary help Supp0rtLinux Linux - Software 1 07-29-2003 01:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration