Working With Oracle® Solaris 11.2 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: July 2014
 
 

How to Verify the DNS Configuration

When modifying the DNS configuration, you can verify the syntax of the /etc/named.conf file with the named-checkzone command.

  1. Become an administrator.

    For more information about obtaining the appropriate rights to perform specific tasks, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Change the configuration file, as needed.

    In this example, the default directory is changed.

    # echo 'options {directory "/var/named";};' > /etc/named.conf
  3. Verify the file contents.
    # named-checkconf
    /etc/named.conf:1: change directory to '/var/named' failed: file not found
    
    /etc/named.conf:1: parsing failed

    In this example, the check failed because the /var/named directory has not yet been created.

  4. Correct any errors reported.
    # mkdir /var/named
  5. Repeat steps 3 and 4 until no errors are reported.
  6. (Optional)To reflect the change in the running service use one of the methods below :
    • Use the rndc command to update the configuration using the –reload or –reconfig option, depending on the changes made.
    • Restart the named service.
      # svcadm restart svc:/network/dns/server:default