I have one DNS server that installed on centOS and based on BIND DNS server.
What i want to do is to make a secondary DNS server that will replicate with the master server and will hold all my zones records and also i need that this server will act as failover when the master server will fall down for some reason the secondary will act as the master to answer all the queries from the world.
Today i was installed a new server (centOS 6) and also installed the BIND DNS server and config it to take all my zones from my master server as slaves zones, like this:
zone "example-domain.com" IN {
type slave;
masters { <master-ip-address>; };
file "slaves/example-domain.com";
};
So after all i successfully get the the zone file updated from the master with all the DNs records and all's good.
The second step that i made is to update the master zone file in all of my domains zones to the new situation so i added a new NS record with my slave details, like this:
$TTL 3600
@ IN SOA XXX.com. ns1.XXX.com. (
2013080901 ; serial, todays date + todays serial #
10800 ; refresh, seconds
7200 ; retry, seconds
10800 ; expire, seconds
86400 ) ; minimum, seconds
NS ns1.XXX.com.
NS dns.netvision.net.il.
NS nypop.netvision.net.il.
**NS ns2.XXX.com.**
MX 1 mail.synerionhcm.com.
@ IN A 1.1.1.1
ns2 IN A 2.2.2.2
www IN A 1.1.1.
localhost A 127.0.0.1
But what i want to know will happen in this situation if my master server will fall down for some reason and the secondary server will not be able to replicate the records from the master, it will delete them? it will act like the primary and will answer the queries from world?
Thanks
Best Answer
From the world's perspective, there's no difference between a master and slave server. Just list them all and the resolving nameserver will retry on another server if it doesn't get a response from the first.
Regarding what happens if the master goes down - that's controlled by the 'EXPIRE' time in the SOA.
With expiry time set to 10800 (as above) your slave servers will expire their data and cease serving the zone after
10800s / 3600s/h = 3 hours
.