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.

Hot to Enable DNS Forwarding Capabilities on an NIS+ Client
  1. Become superuser.

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

In this implementation of NIS, if a /etc/resolve.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 and the hosts.byaddr map by modify the following lines in the Makefile (at the top of the file) from the following.


    #B=-b
    B=

    to


    B=-b
    #B=

    Now makedbm starts with the -b flag when making the maps, and inserts the YP_INTERDOMAINinto 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 command.

    # /usr/lib/netsvc/yp/ypstop

  6. Restart each server with the ypstart command.

    # /usr/lib/netsvc/yp/ypstart


    Note –

    If you have NIS servers that are not running Solaris 2 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 differentversions 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–2 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 resolve.conf or ypxfr -b

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