Installing and Administering Internet Services
Chapter 3 123
Configuring and Administering the BIND Name Service
Configuring the Resolver to Query a Remote Name Server
Configuring the Resolver to Query a Remote
Name Server
Follow these steps if you want your host to query a name server on a
remote host:
1. Create a file on your host called /etc/resolv.conf. The
/etc/resolv.conf file has three configuration options:
• domain followed by the default domain name. The domain entry is
needed only when the localsystem’s host name (as returned by the
hostname command) is not a domain name, and the search option
is not configured.
• search followed by up to six domains separated by spaces or tabs.
The first domain in the search list must be the local domain. The
resolver will append these domains, one at a time, to a host name
that does not end in a dot, when it constructs queries to send to a
name server. The domain and search keywords are mutually
exclusive.
If you do not specify the search option, the default search list will
contain only the local domain.
• nameserver followed by the internet address (in dot notation) of a
name server that the resolver should query. You can configure up
to three nameserver entries.
The following is an example of /etc/resolv.conf:
search cs.Berkeley.Edu Berkeley.Edu
nameserver 132.22.0.4
nameserver 132.22.0.12
2. If you did not specify the local domain with the search or domain
option, set the default domain name with the hostname command, as
in the following example,
/usr/bin/hostname indigo.div.inc.com
and set the HOSTNAME variable in the /etc/rc.config.d/netconf
file to the same value, as in the following example:
HOSTNAME=indigo.div.inc.com