Linux: DNS Debugging

From Define Wiki
Jump to navigation Jump to search

Restart the DNS

/etc/init.d/bind9 restart

Check the Configuration

Look at /etc/bind/named.conf.local. This file defines the zones for the DNS

zone "pxe.boston.co.uk." {
    type master;
    file "/etc/bind/db.pxe.boston.co.uk";
};

Zone Configuration

Each Zone defined above will have an assosicated db file. This file defines the settings, and the hosts within the zone.


$TTL 300
@                       IN      SOA     172.28.0.2. nobody.example.com. (
                                        1368538905   ; Serial
                                        600         ; Refresh
                                        1800         ; Retry
                                        604800       ; Expire
                                        300          ; TTL
                                        )

                        IN      NS      172.28.0.2.

puppet IN A 172.28.0.2

arm0                 IN  A  172.28.98.0;
arm0-ipmi            IN  A  172.28.99.0;


Testing the DNS

check the config

named-checkconf
named-checkzone pxe.boston.co.uk /etc/bind/db.pxe.boston.co.uk

These two tests should show up any issues.


Check a specific host

root@ubuntu1204-cobbler:~/scripts# host cloud9
cloud9.pxe.boston.co.uk has address 172.28.12.9


Problems that have been found

  • DO NOT PUT AN _ on the end of the hostnames!!