Sun Cluster 3.0 U1 Data Services Installation and Configuration Guide

Installing DNS

This section describes the steps to install DNS and to enable DNS to run as the Sun Cluster HA for DNS data service.

The Sun Cluster HA for DNS data service uses the Internet Domain Name Server (in.named) software that is bundled with the Solaris 8 operating environment. See the in.named(1M) man page for information on how to set up DNS. The Sun Cluster configuration involves the following differences.

How to Install DNS

  1. Become superuser on a cluster member.

  2. Decide on the logical hostname that will provide the DNS service.

    This name should be a hostname that is set up when you install the Sun Cluster software. See the Sun Cluster 3.0 U1 Installation Guide for details on how to set up hostnames.

  3. Ensure that the DNS executable (in.named) is in the directory /usr/sbin.

    The DNS executable is bundled with the Solaris 8 operating environment and is located in the /usr/sbin directory before you begin the installation.

  4. Create a directory structure on the cluster file system to hold the DNS configuration and database files.


    Note -

    Create a dns directory and a named directory underneath the dns directory on a cluster file system, for example, /global/dns/named. See the Sun Cluster 3.0 U1 Installation Guide for information on how to set up cluster file systems.



    # mkdir -p /global/dns/named
    
  5. Place the configuration file for DNS, named.conf or named.boot, under /global/dns.

    If DNS is already installed, you can copy the existing named.conf or named.boot file to the /global/dns directory. Otherwise, create a named.conf file in this directory. See the in.named(1M) man page for information on the types of entries to place in named.conf or named.boot. One of the two files, named.conf or named.boot, must exist. Both files can exist.

  6. Place all the DNS database files (listed in the named.conf file) under the /global/dns/named directory.

  7. On all the clients of the Sun Cluster HA for DNS data service, create an entry for the logical hostname of the DNS service in the /etc/resolv.conf file.

    On all the nodes, edit the /etc/resolv.conf file to contain the logical hostname. The following example shows the entries for a four-node configuration (phys-schost-1, phys-schost-2, phys-schost-3, and phys-schost-4) with the logical hostname schost-1.eng.sun.com.


    domain eng.sun.com
     
    ; schost-1.eng.sun.com
    
    (Only entry to be added if the file is already present.)
     
    nameserver 192.29.72.90
     
    ; phys-schost-2.eng
    nameserver 129.146.1.151
     
    ; phys-schost-3.eng
    nameserver 129.146.1.152
     
    ; phys-schost-4.eng
    nameserver 129.144.134.19
     
    ; phys-schost-1.eng
    nameserver 129.144.1.57

    Make the logical hostname the first entry after the domain name. DNS attempts to use the addresses in the order that they are listed in the resolv.conf file to access the server.


    Note -

    If the /etc/resolv.conf is already present on the nodes, just add the first entry that shows the logical hostname in the preceding example. The order of the entries determines the order in which DNS tries to access the server.


  8. On all the cluster nodes, edit the /etc/inet/hosts file to create an entry for the logical hostname of the DNS service.

    In the following example, perform these steps.

    • Replace the IPaddress variable with your actual IP address, such as 129.146.87.53.

    • Replace the logical-hostname variable with your actual logical hostname.


    127.0.0.1						localhost
    IPaddress						logical-hostname
    
  9. On all the cluster nodes, edit the /etc/nsswitch.conf file to add the string dns after cluster and files to the hosts entry.

    The following example shows how to complete this step.


    hosts:		 	cluster files dns
  10. Test DNS.

    Be sure to stop the in.named executable before you proceed. The following example shows how to test DNS.


    # cd /global/dns
    # /usr/sbin/in.named -c /global/dns/named.conf
    # nslookup phys-schost-1
    # pkill -x /usr/sbin/in.named
    

Where to Go From Here

If you installed the Sun Cluster HA for DNS packages during your Sun Cluster installation, go to "Registering and Configuring Sun Cluster HA for DNS". Otherwise, go to "Installing Sun Cluster HA for DNS Packages".