Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
4.  Administering DNS (Tasks) Setting up DNS Servers Testing Your Installation How to Test Your Installation  Previous   Contents   Next 
   
 

Adding Additional Servers

You can add primary and secondary DNS servers to your network.

How to Add Additional Servers

  1. Become superuser.

  2. Set up the server as a DNS client. See "Adding a Client".

  3. Set up the following files.

    boot file
    named.ca
    hosts
    hosts.rev
    named.local

    See "Setting up DNS Servers" for details.

Modifying DNS Data Files

Whenever you add or delete a host or make some other change in one of the DNS data files in the master DNS server or otherwise modify DNS data files, you must also do the following.

How to Change the SOA Serial Number

Every DNS database file begins with a Start of Authority (SOA) resource record. Whenever you alter any data in a DNS database file, you must increment the SOA serial number by one integer.

For example, if the current SOA Serial Number in a data file is 101, and you make a change to the file's data, you must change 101 to 102. If you fail to change the SOA serial number, the domain's slave servers will not update their copy of the database files with the new information and the master and slave servers will become out of sync.

A typical SOA record of a sample hosts file looks like the following.

; sample  hosts  file
@	IN       SOA 	nismaster.doc.com. root.nismaster.doc.com. (
			109 ; Serial
			10800 ; Refresh
 	                1800 ; Retry
			3600000 ; Expire
			86400 ) ; Minimum

Thus, if you made a change to this hosts file, you would change 109 to 110. The next time you change the file, you would change 110 to 111.

Forcing in.named to Reload DNS Data

When in.named successfully starts, the daemon writes its process ID to the file /etc/named.pid. To have in.named reread named.conf and reload the database do the following.

How to force in.named to reload DNS data.

  1. Become superuser.

  2. # kill -HUP `cat /etc/named.pid`

This will eliminate all previously cache, and the caching process will start over again.


Caution - Do not attempt to run in.named from inetd. This will continuously restart the name server and defeat the purpose of having a cache.


Adding and Deleting Clients

When you add or delete a client, always make your changes in the data files stored on your master DNS server. Do not make changes or edit the files on your slave servers because those will be automatically updated from the master server based on your changing the SOA serial number.

Adding a Client

To add a client to a DNS domain, you set the new machine up as a DNS client and then add records for the new machine to the appropriate hosts and hosts.rev files.

For example, to add the host rigel to the doc.com domain, do the following.

How to Add a Client

  1. Become superuser.

  2. Create a /etc/resolv.conf file on rigel.

  3. Add dns to the hosts line of rigel's /etc/nsswitch.conf file

    See "DNS and Internet Access".

  4. Add an address (A) record for rigel to the master server's hosts file.

    rigel  IN  A  192.168.112
  5. Add any additional optional records for rigel to the master server's hosts file.

    Optional records could include the following.

    • Alias (CNAME)

    • Mail exchange (MX)

    • Well known services (WKS)

    • Host information (HINFO)

  6. Add a PTR record for rigel to the hosts.rev file.

  7. Increment the SOA serial number in the master server's hosts and hosts.rev files.

  8. Reload the server's data.

    Either reboot the server or type the following.

    # kill -HUP `cat /etc/named.pid`

 
 
 
  Previous   Contents   Next