4.1) How do I use DNS w/o using NIS or NIS+?

Under SunOS 4.1 it was next to impossible to run DNS name resolution without either a kludge fix or the NIS (V2 I guess). Under Solaris 2.1 it is incredibly simple, but you must ignore what the manual (SunOS 5.1 Administering NIS+ and DNS) says (the manual is fixed in Solaris 2.2). All that is required to make a non-NIS host use the DNS for name resolution is to change the host: line in the /etc/nsswitch.conf file to the following:

hosts:  files dns

(i.e., when looking for hosts, look in /etc/hosts first, if not found there, try DNS, if still not found then give up) and set up a correct version of /etc/resolv.conf to tell the resolver routines (like gethostbyname) how to contact the DNS nameserver. You must have the names of machines which are somehow contacted during boot in the files in /etc and files must appear first in the hosts: line, otherwise the machine will hang during boot (at least ours did). Make sure that /etc/netconfig is as it was shipped. (In Solaris 2.3 and earlier, it will use "switch.so,tcpip.so" for ip, in Solaris 2.4 it just uses "-")

PREV INDEX NEXT