Getting SunOS 4.1 to use DNS -and- /etc/hosts (long)

Jack Kramer jkramer at molbio.med.miami.edu
Fri Mar 15 12:03:14 AEST 1991


I am not a big fan of ULTRIX but this is one case where DEC has done it
right.  The attached man page from an ULTRIX machine describes the
svcorder file which allows specification of which methods to use to
resolve name->address resolution and the specific order in which to 
use /etc/hosts or BIND or YP.  Perhaps the other BSD folks (Sun?)
could swallow a little pride and provide the same elegant solution.
It still allows the use of YP without shoving it down our throats.


---------------------------------------------------------------------

NAME
     svcorder - designate the order and selection of services

SYNTAX
     /etc/svcorder

DESCRIPTION
     The svcorder file designates the order and selection of name
     services that will be queried to resolve host names and
     addresses.  The queries to the services are made through the
     gethostent interface.

     The svcorder file must exist if your system accesses host
     names and addresses by database lookup services such as Yel-
     low Pages (YP) or BIND.  You do not need the svcorder file
     if you only have local access, that is, if you are using
     only the local /etc/hosts file to obtain host name and
     address information.

     The service names are defined in the /usr/include/netdb.h
     file.

     The order in which the service names are placed in the
     svcorder file indicates the order that they are queried to
     resolve a given name or address.  The following example
     shows the contents of the svcorder file if YP will be
     queried first, then BIND, and then the local service, if YP
     cannot resolve the data:

          yp
          bind
          local

     The svcorder file must have an entry for local. Otherwise,
     your system cannot resolve any queries in the event that the
     lookup services, other than local, are down.

     If you set up a database lookup service such as YP or BIND,
     be sure that the svcorder file exists.  Create the file if
     it does not.  The ypsetup and bindsetup commands do this
     automatically.

FILES
     /etc/hosts
     /usr/include/netdb.h
     /etc/svcorder

SEE ALSO
     gethostent(3n), hosts(5), bindsetup(8), ypsetup(8yp)
     Guide to the BIND Service
     Guide to the Yellow Pages Service




                                                                1



More information about the Comp.unix.questions mailing list