Switching roles of bind master/slave

Gustav_ used Ask the Experts™
I have a bind master (A), and a slave (B), Both running bind 9. The master (A) is to be taken out of service (not only the hardware but also the IP can no longer be used) and a third host (C), is to be added as a nameserver to the zone.

My migration strategy is:
1. Add (C) as a slave to (B)
2. Switch roles of (A) and (B) ie. make (B) the master and (A) a slave
3. Make sure all clients and customers use nameservers (B) and (C)
4. Take (A) out of service.

Going through the procedure above in detail, I've come up with a couple of questions I hope somebody can help me out with or point me in the right direction.

1. This should be pretty straight forward, only add the IP ( of host (C) to the allow-transfer -list? And then add as a DNS for the domain.
2. I guess this should only be a matter of moving the named.conf and zone-files from (A) to (B) and move the named.conf from (B) to (A) and reload the servers. But how is this done to minimize downtime?
3. Pretty straight forward, take tcpdumps on (A) to find out what hosts are using it as a resolver and remove it as a resolver for the domain.

Are there any more potential pitfalls to this? Any other considerations to be made? Is it possible to do this in a way as to minimize hassle even more than with the procedure above?

All hints, tips and pointers are more than welcome!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2015
It sounds as if you have everything in order:

1) copy the slave named.conf to the third server, changing, if necessary to the listen-on IP, start named, verify that iptables is allowing both TCP and UDP port 53 traffic

2) on the second server, backup named.conf

3) copy the master named.conf, all *.db and *.rev files to the second server in a backup location, modify the allow transfer list and the listen-on IP in named.conf, if necessary, and mv -f the named.conf and zone files, restart dns

4) add the third server as authoritative and remove the first server

5) leave the service running on the first server until you identify the IPs using it for dns.

Your downtime should not be noticeable.  As long as everything is backed up on the first and second server should you need to revert back, you'll be okay.


Thanks, that's the kind of "second opinion" i needed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial