Bind dns master and slave are not synchronized immediately
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.