System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

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 edit the files on your slave servers. The files are automatically updated from the master server when you change the SOA serial number.

How to Add a Client

To add a client to a DNS domain, set the new machine up as a DNS client. 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.

  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`

How to Remove a Client

To remove a client from a DNS domain do the following.

  1. Become superuser.

  2. Remove dns from the hosts line of the machine's nsswitch.conf file.

  3. Remove the machine's /etc/resolv.conf file.

  4. Delete the records for that machine from the master server's hosts and hosts.rev files.

  5. Check to see if the machine has CNAME records that point to the machine. If so, delete the CNAME records from the hosts file.

  6. Set up replacements for services supported by the removed machine.

    If the machine is a master server or a host for any other necessary process or service, set up another machine to perform those services.