19.2 Host Names and addresses
For SunOS 4.1.X you can get this automatically through the Network Information Services (NIS) when you set the option "B=-b" in /var/yp/Makefile and re-initialize the NIS maps. Then NIS will automatically query the name server specified in /etc/resolv.conf for hosts not found in the NIS maps.
For SunOS 5.X you turn on this service by specifying "dns" for the host entry in the network switch configuration file, /etc/nsswitch.conf. You can also have the system query NIS and or the local /etc/hosts file by specifying those, in the desired order, on this entry, e.g.:
hosts: dns nis files
Queries to DNS will then be resolved using the information supplied in /etc/resolv.conf.
The /etc/resolv.conf file contains the IP domain name of the system and a list of name servers to use. For SunOS 5.X you can also specify a search path to use, e.g.:
nameserver 22.214.171.124 <---- ns1.net.ohio-state.edu (nisca.acs), authoritative for OSU
nameserver 126.96.36.199 <---- ns2.net.ohio-state.edu
search acs.ohio-state.edu magnus.acs.ohio-state.edu eng.ohio-state.edu ohio-state.edu
The domain will automatically be appended to any host name not having a dot (.) in the name. The first nameserver listed will be considered primary and queried first. Additional ones will be queried, in order (up to a maximum of 3), if the primary one does not respond to the request.
Many resolvers will accept the search field, whereby names to be resolved have these strings appended and then checked for resolution, in the order specified, until one is resolved.