The first step to a successful migration is to gauge what your impact is. With dns-tools, we can perform an assessment of one or more IP addresses, a range of IPs or entire subnets. Here we provide a simple CSV file with a list of ‘Old IPs’ and ‘New IPs’ for our data centre migration:
dns-tools impact -db -if impacted_ips.csv
Note: Here we use the -db flag to use the default BIND installation directory, /etc/bind. You can also simply provide one or more zonefiles or an alternative BIND installation path.
You can output this to your console as shown by default, or TSV if you want to work with this data in Excel, see the -o option. The output here is one line per impacted DNS resource record, showing the FQDN, old IP and the zone file where the entry is.
Before the migration, we can resolve these records against our DNS server to capture how they resolve pre-migration:
dns-tools resolver -db -o json > before_migration.json
Do your data centre migration. Need help? We’re experts, get in touch here.
After the migration has completed we can check that all of our records resolve as expected post-migration:
dns-tools resolver -dn 220.127.116.11 -o json > after_migration.json
With this we can compare the results pre-migration directly against the results post-migration:
diff before_migration.json after_migration.json
In this example, we can see that all the records we wanted to change the IP address on are correctly resolving to their ‘new’ IP address!
Congratulations, you have now safely executed your datacenter migration in a measured and repeatable way.