DNS Resolution using named-checkzone

I had an issue today with our DNS server. The new DNS entries weren’t resolving. It was found that two CNAME entries in the DNS were pointing to different servers which screwed up the DNS. Here’s what I used to get the error in the DNS table:

Got a dump of the Zone data in a file. Then executed named-checkzone on the dump file to get the incorrect entry:

Login to your DNS server and execute the following command:

dig @localhost yourdomain.net axfr > tmp

Execute named-checkzone on the dump file to view results

named-checkzone yourdomain.net tmp

Output:

tmp:1366: ignoring out-of-zone data (some-site-without-domain)
tmp:1419: ignoring out-of-zone data (some-test-site-without-domain)
dns_master_load: tmp:6566: PROBLEM.yourdomain.net: multiple RRs of singleton type
zone yourdomain.net/IN: loading from master file tmp failed: multiple RRs of singleton type
zone yourdomain.net/IN: not loaded due to errors.

Sample data from tmp file

some-site-without-domain. 86400 IN CNAME web-server.yourdomain.net.
problem.yourdomain.net. 86400 IN CNAME web-server.yourdomain.net.
some-site.yourdomain.net. 86400 IN CNAME another-web-server.yourdomain.net.
more-site.yourdomain.net. 86400 IN CNAME web-server-1.yourdomain.net.
PROBLEM.yourdomain.net. 86400 IN CNAME web-server-2.yourdomain.net.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s