[comp.protocols.tcp-ip] named vs. bind

RACKLEY@MSSTATE.BITNET (Mike Rackley) (08/25/88)

SunOS4.0 documents the named daemon as providing internet domain name
server capability.  I have seen references on the net to porting bind
to SunOS4.0 to provide the same capability.  What are the differences
in named and bind?

Mike Rackley
Mississippi State University

hedrick@aramis.rutgers.edu (Charles Hedrick) (08/28/88)

Named and bind are sort of the same thing.  Named is the name of the
name daemon program.  Bind seems to be the name of the package as a
whole, which includes named and the resolver.  However people
sometimes say they are bringing up bind when they mean named and visa
versa.  Sun includes bind as part of 4.0.  However there are reasons
why somebody might want to start with the current Berkeley source and
reinstall it:
  - they might want the very latest version of named
  - they might want to build the resolver into libc
Let me explain.

In case you're not familiar with the terms: the name daemon is a
program that keeps a database of all hosts known to your machine.
When other programs want to look up a name, they send a message to
your name daemon.  If it doesn't already know, the name daemon asks
other servers around the net, and eventually comes up with an answer,
which it sends back to your program.  The reason for sending all
requests through a single name daemon rather than having each program
talk to the network for itself is that this allows the name daemon to
build up a cache of known names, so that it normally doesn't have to
go out to the network.  Individual application programs typically
don't last very long, so any cache they built up wouldn't do much
good.  You need not run the name daemon on each machine.  You can put
it just on a few servers and point the other systems to them.

The resolver is simply a set of subroutines used to send questions to
the name daemon, and get back the responses.  The most commonly used
subroutine is a replacement for gethostbyname. It looks to the caller
like the gethostbyname supplied by Sun, but instead of looking things
up in the host table or YP, it asks the name daemon.

Now, for why somebody might want to port bind to Sun 4.0.  Sun
supplies named (possibly called in.named).  It's slightly out of date,
though there's an update package you can get from Sun with the newest
one.  Sun also supplies the resolver routines in a library
libresolv.a.  However that only helps you if you have source, since
you have to load your programs with -lresolv.  Sun's version of
telnet, ftp, etc., is not loaded with the resolver, so they will not
talk to named.  Their idea is that programs should use YP, and YP
should talk to named if the name isn't in the YP database.
Unfortunately, the interface from YP to named doesn't work.  There's
an update package you can get from Sun to fix that.  However even if
it worked, some of us don't like having to go through two different
daemons to look up names.  Also, the Berkeley resolver lets users
define their own abbreviations for host names, and if you put the
requests through YP, that mechanism doesn't work.  So some of us want
to rebuild the sharable library, /usr/lib/libc.so.1.x, so that it has
the resolver instead of the YP-based gethostbyname and gethostbyaddr.
Because of the way sharable libraries work, this will instantly fix
telnet, ftp, etc.  If you don't do much Arpanet traffic, it's probably
good enough to get the bind update package from Sun, which has the
newest named and the fixed version of ypserv that knows how to talk to
named.  However if you do a lot of network traffic, you'll want to
talk to your Sun representative and ask them to create a version of
libc with the resolver in it.