As we discussed in Chapter 2, TCP/IP networking
may rely on different schemes to convert names into addresses. The
simplest way is a host table stored in
/etc/hosts. This is useful only for small LANs
that are run by one single administrator and otherwise have no IP
traffic with the outside world. The format of the
hosts file has already been described in Chapter 5.
Alternatively, you can use the
Berkeley Internet Name Domain service (BIND) for
resolving hostnames to IP addresses. Configuring BIND can be a real
chore, but once you've done it, you can easily make changes in the
network topology. On Linux, as on many other Unixish systems, name
service is provided through a program called
named. At startup, it loads a set of master files
into its internal cache and waits for queries from remote or local
user processes. There are different ways to set up BIND, and not all
require you to run a name server on every host.
This chapter can do little more than give a rough sketch of how DNS
works and how to operate a name server. It should be sufficient if you
have a small LAN and an Internet uplink. For the most current
information, you may want to check the documentation contained in the
BIND source package, which supplies manual pages, release notes, and
the BIND Operator's Guide (BOG). Don't let this
name scare you off; it's actually a very useful document. For a more
comprehensive coverage of DNS and associated issues, you may find
DNS and BIND by Paul Albitz and Cricket Liu
(O'Reilly) a useful reference. DNS questions may be answered in a
newsgroup called comp.protocols.tcp-ip.domains. For
technical details, the Domain Name System is defined by RFC numbers
1033, 1034, and 1035.