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

DNS Forwarding

The nsswitch.conf file controls DNS forwarding and Interent access for clients. NIS clients have implicit forwarding capabilities. NIS+ clients do not. See below.

How to Enable DNS Forwarding Capabilities on an NIS+ Client

  1. Become superuser.

  2. Properly configure the hosts line in the /etc/nsswitch.conf file to read: hosts: nisplus dns files.

In this implementation of NIS, if a /etc/resolv.conf file exists on the server, ypstart automatically starts the ypserv daemon with the -d option to forward requests to DNS. To stop forwarding to DNS, edit the /usr/lib/netsvc/yp/ypstart script to remove the -d option from the ypserv command. You must then reboot the machine.

How to Enable DNS Forwarding Capabilities on an Older NIS Client

  1. Become superuser.

  2. Set the YP_INTERDOMAIN key in the hosts.byname map. Set the hosts.byaddr map by modifying the following lines in the Makefile.


    #B=-b
    B=

    to


    B=-b
    #B=

    Now makedbm starts with the -b flag when making the maps, and inserts the YP_INTERDOMAIN into the ndbm files.

  3. Rebuild the maps.


    # /usr/ccs/bin/make hosts
    
  4. Make sure that all NIS servers have an /etc/resolv.conf file that points to valid name server(s).

  5. Stop each server with the ypstop script.


    # /usr/lib/netsvc/yp/ypstop
    
  6. Restart each server with the ypstart script.


    # /usr/lib/netsvc/yp/ypstart
    

    Note –

    If you have NIS servers that are not running the Solaris 2 release or higher, make sure that the YP_INTERDOMAIN key is present in the host maps. In addition, problems might arise if the master server and slave server are running different versions of Solaris. The following table summarizes the commands to issue to avoid such problems. The notation “4.0.3+” means “release 4.0.3 of SunOS or later.” The command makedbm -b is a reference to the “-B” variable in the Makefile.


    Table 4–1 NIS/DNS in Heterogeneous NIS Domains

    SLAVE 

    MASTER 

     

    4.0.3+ 

    Solaris NIS 

    4.0.3+ 

    Master: makedbm -b

    Slave: ypxfr

    Master: makedbm -b

    Slave: ypxfr -b

    Master: ypserv -d

    Slave: ypxfr -b

    Solaris NIS 

    Master: makedbm -b

    Slave: ypxfr

    Master: makedbm -b

    Slave: ypxfr

    Master: ypserv -d

    Slave: ypxfr with resolv.conf or ypxfr -b

The Solaris operating environment includes the dynamic library routines that make up the resolver.