Go to main content

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

Exit Print View

Updated: October 2017
 
 

How to Configure Machine Host Name and Address Lookup Through NIS and DNS

Typically, NIS clients are configured with the nsswitch.conf file to use only NIS for machine name and address lookups. If this type of lookup fails, an NIS server can forward these lookups to DNS.

  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.3.

  2. Add the YP_INTERDOMAIN key.

    The two map files, hosts.byname and hosts.byaddr must include the YP_INTERDOMAIN key. To test this key, edit the following lines in /var/yp/Makefile:

    #B=–b
    B=

    Modify the above lines as shown below:

    B=–b
    #B=

    makedbm will now start with the –b flag when it makes the maps, and the YP_INTERDOMAIN key will be inserted into the ndbm files.

  3. Run the make command to rebuild maps.
    # make hosts
  4. Check that DNS name servers are set properly.

    The following command lists all of the IP addresses for the DNS name servers:

    # svcprop -p config/nameserver network/dns/client:default
  5. To enable DNS forwarding, restart each server.
    # svcadm restart network/nis/server:instance

    In this implementation of NIS, the ypserv daemon automatically starts with the –d option to forward requests to DNS.