Domain Name Service under SunOS is lacking

mcooper at usc.edu mcooper at usc.edu
Sun Nov 12 12:25:15 AEST 1989


Domain Name Service under SunOS currently is not supported very well at
all as most Internet people have figured out by now.  I'd like to know if
Sun plans on cleaning things up sometime soon.  I'd be interested in
hearing even vague rumors.

First, let me state my complaints and then a few suggested solutions that
don't seem that hard to implement.

Under the present setup (4.0.3), you can enable DNS lookup of hostnames
and IP addresses and such by running ypserv with -i.  What happens,
though, when you don't run YP but need DNS?  You have two choices.  You
can get (or build from source) a new shared libc with the DNS resolver
routines installed instead of the YP routines or you can recompile things
with the resolver routines explicitly.  Installing your own new libc has
disadvantages.  You wind up with a non standard libc for one.  Whenever
new releases of SunOS come out, you're stuck until either Sun makes a new
libc with DNS available or they ship sources.  We've taken the approach of
recompiling with the resolver library all programs we wish to run with
DNS.

Although I hate to admit it, DEC came up with a very reasonable way of
letting each host configure local, YP, and DNS (bind) host name lookups.
Under the new settup (Ultrix 4.0) the file /etc/svc.conf contains various
parameters you can set.  (NOTE #1: Ultrix 3.X has a more primitive
specification for these features, but the functionality is the same.  NOTE
#2: The /etc/svc.conf file is also used to determine what services to use
for lookup of passwd, group, (mail) aliases, etc., but that's another
story.)  One such parameter is called "hosts".  You set "hosts" to a list
of the keywords "local", "yp", and "bind".  If you wanted to first check
/etc/hosts, then use DNS (bind), you would set "hosts=local,bind".  The
gethost*ent() routines call a routine named "getsvc()" which steps through
the /etc/svc.conf file.  The gethost*ent() routines look for the "hosts"
key.  Once a routine finds the "hosts" key it scans the given list of
keywords, processing each in order.  Each gethost*ent() routine has
routines for dealing with each type of host lookup.  For instance, the
gethostbyname() routine calls gethostbyname_local(), gethostbyname_yp(),
and gethostbyname_bind() depending on the value it gets from the "hosts"
keyword in /etc/svc.conf.  In the above example, gethostbyname would first
call gethostbyname_local().  If this routine failed to find the named
host, gethostbyname_bind would then be called.

This seems like a very clean approach.  It lets the system administrator
configure on a per machine basis in a very simple manner, what services to
use for name lookups of various types.  Why doesn't Sun get its act
together with DNS and implement something like this?


Michael A. Cooper, University Computing Services, U of Southern California
  INTERNET: mcooper at usc.edu	            PHONE: (213) 743-2957
  UUCP: ...!uunet!usc!mcooper              BITNET: mcooper at gamera



More information about the Comp.sys.sun mailing list