Implementing DNS on Linux - Part III

September 07, 2005
This is the third and final part of my post on DNS. You can read the part I and part II of this post if you haven't done yet and then come back to this post.
Check BIND Syntax with these utilities
If there is a syntax error in the files /etc/named.conf or /var/named/* files, then the BIND server will fail to start. There are two utilities that come along with BIND which helps one to check for syntax errors in the files. They are :
  • named-checkconf - This script checks the /etc/named.conf file for any syntax errors.
  • named-checkzone - This file checks for any syntax errors in a specific zone configuration.
# named-checkzone mysite.com /var/named/mysite.com.zone

BIND Utilities
Many useful utilities are included in the bind-utils RPM package. Some of these are as follows:
host - This is a utility used to gather host/domain information. It is capable of showing all the information about a host and / or listing an entire domain.

# host -a www.mysite.com


... lists all information about www.mysite.com

# host -al mysite.com


... shows all information for every host in the mysite.com domain. Listing an entire domain's contents is known as performing a "total zone transfer".

dig - Short form for domain information gropher is a utility used to send queries directly to the name server, bypassing any system resolver libraries. This direct access is useful for problem isolation. The output of dig is in zone file format.
Some examples using dig are as follows:

$ dig @ns mysite.com
$ dig mail.mysite.com
$ dig -x 192.168.0.254
$ dig www.yahoo.com


Note: Dig expects to be given FQDNs for lookups, while host utility will look at the search information in /etc/resolv.conf file.

Additional help on configuring BIND
If you have installed BIND software on your machine, you can find additional docs on BIND at these locations :
BIND features - /usr/share/doc/bind-version/README
Migration to BIND from other DNS servers - /usr/share/doc/bind-version/misc/migration
BIND ver 9 administration manual - /usr/share/doc/bind-version/arm/Bv9ARM.html
Also visit the BIND home page.

1 comments:

  • thanks a lot for this posting.
    DNS is not new to me, but the use of "dig".
    until a few minutes i always used nslookup.
    Now after i red your examples, i had a deeper
    look into "dig".
    great utility. Looks like i'm getting rid of nslookup now ;-)

    J