LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 09-02-2007, 02:53 AM   #1
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Rep: Reputation: 15
dns slave updates ?


Hi,

I have configured one primary(master) and secondary (slave)dns server in my RHEL-5 network. I want to know how can I set time interval for sync between these two servers whenever records get updated on primary dns server. It takes much time to replicate new records to slave server. How can I update slave records manually without waiting for default time interval? what are the useful commands for replication between master and slave servers ?

thanx
 
Old 09-03-2007, 02:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
It's supposed to be done automatically. I.e. whenever a change occurs in a primary zone, master dns notifies the slave about that change. I suggest you to look better at your configuration on both master and slave server and also take a look at the dns howto.

Regards
 
Old 09-03-2007, 06:43 AM   #3
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
slave update

THanks for replying.

How can i manually update dns records on slave instead of waiting for 3 hrs.(default).Is there any command to update slave records.
 
Old 09-03-2007, 08:09 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
If you insist on updating slave manually, you can run:
Code:
rndc reload domain.com
But once again I tell you to look at your configuration and maybe logs to find out what's the problem, since this should happen automatically (as soon as you make a change on the primary and reload the zone the primary should notify the slave about the change).
 
Old 09-04-2007, 08:11 AM   #5
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
ns2 not resolving queries

ns1-172.16.1.31
ns2-172.16.1.32

ns2 is unable to resolve queries when ns1 gets down.Why ?/these are the only enteries which i entered in named files.(There is no syntex error in any file).I had manually type below enteries.

# vi named.conf

allow-recursion { 172.16.1.1/24; 172.16.2.0/24; localhost; };
:

zone "7i.net.sa" IN {
type master;
file "7i.net.sa.zone";
allow-transfer { 172.16.1.32: };
allow-update {none; } ;
notify yes;

};


zone "1.16.172.in-addr.arpa" IN {
type master;
file "7i.net.sa.local";
allow-transfer { 172.16.1.32: };
allow-update {none; } ;
notify yes;

};




ns1#vi 7i.net.sa.zone file
7i.net.sa. IN SOA ns1.7i.net.sa. root.7i.net.sa. (
59
3H
15M
1W
1D )

IN NS ns1.7i.net.sa.
IN NS ns2.7i.net.sa.




ns2# vi named.conf

zone "7i.net.sa" IN {
type slave;
file "slaves/7i.net.sa.zone";
masters { 172.16.1.31; };
};

zone "1.16.172.in-addr.arpa" IN {
type slave;
file "slaves/1.16.172.in-addr.arpa";
allow-transfer { 172.16.1.32: };
master {172.16.1.31; }

};




The problem is when ns1 gets down, ns2 is unable to resolve queries.Zone file in ns2 gets updated after 3 hrs.(default).Why is it so ??
 
Old 09-04-2007, 09:08 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
You have a typo in your config/zone files:
Quote:
allow-transfer { 172.16.1.32: };
You must change colon ( : ) to a semicolon( ; ) after the slave IP address, i.e.
Code:
allow-transfer { 172.16.1.32; };
 
Old 09-04-2007, 09:17 AM   #7
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
slave updation error

Hi,

As iold you earlier that i have manually type these enteries here in this forum.So please ignore these errors.when i check zone file in slave, sometimes it shows update and sometimes not.I donot know the reason.I wanna know why slave is not taking the role of master when master gets down.

Please ignore any syntex like . : and ; I have checked them all.

Regards,
 
Old 09-04-2007, 09:27 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
How do you reload a zone in your master, right after you make a change?
Make a change in a master zone, increase the serial and watch /var/log/messages (or whatever logfile dns changes are logged) to see what happens when you're reloading the zone.
 
Old 09-05-2007, 02:21 AM   #9
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
slave updation

"How do you reload a zone in your master"

I have only edited the zone file and change the serial number and nothing else.Do we have to reload the zone manually? If yes ,How?

I changed the serial number, modified the zone file but no message in /var/log/message.I have changed the resfresh time from default to 1 min. Even then no information of zone transfer in /var/log/message file.It takes more than 1-2 hr. for slave for updation.

Why is it so ??

Please clarify these doubts?/
 
Old 09-05-2007, 04:38 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
Quote:
I have only edited the zone file and change the serial number and nothing else.Do we have to reload the zone manually? If yes ,How?
Whenever you make a change in a zone in your master dns you must reload/restart named manually in order for the changes to take effect immediately. This can be done running one of the following:
Code:
rndc reload    <--check all zones for changes
rndc reload 7i.net.sa  <--reloads only specific zone
killall -HUP named      <--restarts named and re-reads zone files
or you can just stop/start named.
After master dns gets notified about the changes, it also notifies the slave about them.
 
Old 09-06-2007, 01:33 AM   #11
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
dns slave

Many thanx for resovling my query.
 
Old 09-06-2007, 01:44 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
So your problem was that you didn't reload the zone after making changes!! I thought it's obvious that when you make a change you should somehow notify named about it.
Anyway glad to see it worked.

Cheers
 
Old 09-06-2007, 06:56 AM   #13
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
slave

Yeah ,Problem solved.

Now different problem and expect you to solve this too.I had posted it seperatly as conga on RHEL-5.

Please check it.
 
Old 09-06-2007, 07:32 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,175
Blog Entries: 1

Rep: Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042Reputation: 2042
I'm sorry but I can't help you on this since I have no experience on these tools. Perhaps someone else can help you.
What I suggest you is to read the documentation and try to figure out how to accomplish what you want to do.

Good luck
 
Old 09-06-2007, 07:37 AM   #15
sachin1361
Member
 
Registered: Feb 2007
Posts: 126

Original Poster
Rep: Reputation: 15
hi

Thanx for the docs.But I have read this document already and much more.But could not find any relevant info which I required.

Anyway I will try to find from other source.

Regards,
 
  


Reply



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 Error lindatan83 Linux - Networking 1 09-01-2006 09:02 PM
Slave dns help neocontrol Linux - Networking 5 05-12-2006 06:52 PM
DNS SLAVE problem cccc Linux - General 0 11-29-2005 05:08 PM
Slave DNS server guntanis Linux - Networking 4 12-10-2003 09:02 AM
slave DNS problems granny Linux - Networking 17 12-27-2002 08:06 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:02 PM.

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
Open Source Consulting | Domain Registration