DNS BIND9 - migrating to new server

General support questions
Post Reply
fishface
Posts: 27
Joined: 2016/08/02 15:47:42

DNS BIND9 - migrating to new server

Post by fishface » 2017/07/03 17:46:23

I currently have a master/slave set-up for a couple of domains, but need to migrate off the old hardware to new.

I currently have the relevent zones files working on the new servers, and all working great, but I'm having trouble figuring how to do the switch-over, mainly to do with the SOA record.

As an example, my current SOA is: OldServerName.foobar.com

Proposed new SOA: NewServerName.com

There seems to be 2 ways of switching.

1) Turn of the old DNS servers, and then on the new DNS change the SOA record to a NewServerName.com, increase the serial. flush/reload rndc (DNS)

2) The other method seems to be this, turn off the old DNS servers, do not change SOA, leave it at OldServerName.foobar.com, increase the serial. flush/reload rndc (DNS)

Should also add, the IP address of the new servers are different to the original, and will remain so as our network has changed to a new subnet as well.

Which one is the best way of doing it?

fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Re: DNS BIND9 - migrating to new server

Post by fishface » 2017/07/20 19:38:31

Ok got it done.

Option 1 worked for me, I did this.
  • On OLDNSSRV1 - Stopped the named daemon on the old Authoritative(SOA) DNS server
  • On the new server changed the SOA line for each zone file to whatever name you want it to be called, different from the original in my case, for me it became SOA NEWDNSSRV1

Code: Select all

$TTL                            86400
@                               IN      SOA NEWDNSSRV1.yourdomain.com. hostmaster.yourdomainname.com. (
                                                2017071800      ; serial
                                                10800           ; refresh - 3 hours
                                                3600            ; retry - 1 hours
                                                3600000         ; expire - 1000 hours
                                                86400 )         ; Minimum - 24 hours
  • Increase the serial number for all the zone files you change, ensure it's a different number than the ones on your old DNS server
  • I changed the SOA TTL from 86400 down to 300, this is the lowest you can go, to speed up propagation and it worked great
  • Rerfesh/restart named and you are done
You can use google DNS tools check progress.

Post Reply