LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-31-2016, 11:12 PM   #1
hilou
Member
 
Registered: May 2013
Posts: 93

Rep: Reputation: Disabled
Bind dns master and slave are not synchronized immediately


Bind Version: BIND 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6

[Master ip:10.0.0.1]
named.conf:
options {
listen-on port 53 { 10.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";


allow-query { any; };
allow-query-cache { any; };
allow-transfer { 10.0.0.2; };
forwarders {10.14.0.9;10.14.1.9;};
forward only;

};


logging {
channel default_debug {
file "data/logs/named.run";
severity dynamic;
};

channel query_log {
file "data/logs/bind-query.log" versions 3 size 20m;
severity info;
print-time yes;
print-category yes;
};
category queries {
query_log;
};
};


view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
};

zone "test.net" IN {
check-names ignore;
type master;
file "test.net.zone";
notify yes;
allow-update { none; };
};

Zone config:
$TTL 86400
@ IN SOA @ root.testline.com. (
17 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

IN NS ns.testline.com.

[Slave ip:10.0.0.2]
named.conf:
options {
listen-on port 53 { 10.0.0.2; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";


allow-query { any; };
allow-query-cache { any; };
forwarders {10.14.0.9;10.14.1.9;};
forward only;


};

logging {
channel default_debug {
file "data/logs/named.run";
severity dynamic;
};

channel query_log {
file "data/logs/bind-query.log" versions 3 size 20m;
severity info;
print-time yes;
print-category yes;
};
category queries {
query_log;
};
};

view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
};

zone "test.net" IN {
type slave;
masters { 10.0.0.1; };
file "slaves/test.net.zone";
};

[Zone config]
$ORIGIN .
$TTL 86400 ; 1 day
test.net IN SOA test.net. root.testline.com. (
17 ; serial
10800 ; refresh (3 hours)
900 ; retry (15 minutes)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS ns.testline.com.

LOGS and symptom:
After I updated the dns config and increase the servial number of master SOA to 17. I got logs below:
zone test.net/IN/localhost_resolver: loaded serial 17
zone test.net/IN/localhost_resolver: sending notifies (serial 17)
client 10.0.0.1#25801: view localhost_resolver: received notify for zone 'test.net'

No logs from Slave.

After two hours:
client 10.0.0.2#52341: view localhost_resolver: transfer of 'test.net/IN': AXFR-style IXFR started
client 10.0.0.2#52341: view localhost_resolver: transfer of 'test.net/IN': AXFR-style IXFR ended
client 10.0.0.2#32990: view localhost_resolver: received notify for zone 'test.net'

And now client updated its config.

My question is why it's not immediately synchronized.


Thank you in advance.
 
Old 04-01-2016, 02:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You need to add the secondary dns in the master zonefile.
There also some changes you need to do:
Replase @ with the authoritative dns in the SOA RR
Add the A RRs for the 2 NS RRs:
Code:
$TTL 86400
@ IN SOA ns.testline.com. root.testline.com. (
17 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

 IN NS ns.testline.com.
 IN NS ns2.testline.com.
ns IN A 10.0.0.1;
ns2 IN A 10.0.0.2;
BTW, since you're trying to run an authoritative dns, you don't need the forwarding stuff in both master and slave named.conf

Regards
 
Old 04-01-2016, 03:48 AM   #3
hilou
Member
 
Registered: May 2013
Posts: 93

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

You need to add the secondary dns in the master zonefile.
There also some changes you need to do:
Replase @ with the authoritative dns in the SOA RR
Add the A RRs for the 2 NS RRs:
Code:
$TTL 86400
@ IN SOA ns.testline.com. root.testline.com. (
17 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

 IN NS ns.testline.com.
 IN NS ns2.testline.com.
ns IN A 10.0.0.1;
ns2 IN A 10.0.0.2;
BTW, since you're trying to run an authoritative dns, you don't need the forwarding stuff in both master and slave named.conf

Regards

Thank you for your comment. I have updated the config accordingly, but still not work. the same with before.
 
Old 04-01-2016, 04:45 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by hilou View Post
Thank you for your comment. I have updated the config accordingly, but still not work. the same with before.
I guess you've increased the serial...
 
Old 04-02-2016, 10:11 PM   #5
hilou
Member
 
Registered: May 2013
Posts: 93

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
I guess you've increased the serial...
No, I didn't update it, should I ?
 
Old 04-03-2016, 02:44 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by hilou View Post
No, I didn't update it, should I ?
Of course you should increase the serial on master.
This way it's aware of zone changes, so it then sends notifies to slaves and they get updated accordingly
Read this for more details
 
Old 04-06-2016, 02:42 AM   #7
hilou
Member
 
Registered: May 2013
Posts: 93

Original Poster
Rep: Reputation: Disabled
Nope, still not working. It's not synchronized immediately.
 
Old 04-06-2016, 05:29 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by hilou View Post
Nope, still not working. It's not synchronized immediately.
Ditch the view in both the master and slave and restart bind.
Quote:
view localhost_resolver {
match-clients { any; };
match-destinations { any; };
recursion yes;
};
Also enable AXFR logging in both dns servers to watch the logs when updating a zone in master.
Then try again to increase the serial on master and see if it sends notifies to slave to start the AXFR.
 
  


Reply

Tags
bind9, redhat



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
bind Views with Master and Slave fantasygoat Linux - Server 6 07-08-2014 12:47 AM
[SOLVED] DNS bind slave master comunication problem hrmn Linux - Server 14 08-12-2013 12:21 AM
Bind Master > Slave not updating ACDII Linux - Server 6 06-11-2009 04:24 PM
DNS BIND Zone transfer fails from Master to Slave ALInux Linux - Networking 0 08-28-2007 05:19 AM
Tranferring Zones, Master to Slave, DNS - BIND newpylong Linux - Networking 0 09-02-2004 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:26 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
Open Source Consulting | Domain Registration