Next | Prev | Up | Top | Contents | Index

Configuring Hostname Resolution With /etc/resolv.conf

The only configuration file required by BIND clients is the /etc/resolv.conf file.This file is read the first time gethostbyname or gethostbyaddr is called. The resolv.conf file has several functions:

The first two items apply to both client and server stations. The last item is required only by client stations. The file's format is described in detail in the resolver(4) reference page.

To set up a station as a client of remote servers, add nameserver entries for the Internet addresses of the name servers to /etc/resolv.conf. For example:

nameserver 128.32.130.12

You can specify up to three nameserver entries. It is usually not necessary to create this file if you have a local server running. An entry for the local server should use an Internet address of 0 (meaning "this station").

On client and server stations, the name in /etc/sys_id should be set to the fully qualified domain name. For example:

monet.Berkeley.EDU

However, if you choose not to use fully qualified domain names, add a line with the keyword domain and the station's domain to the resolv.conf file. For example:

domain berkeley.edu

The gethostbyname and gethostbyaddr library routines are normally configured to access station information in this order:

  1. NIS

  2. BIND

  3. Local /etc/hosts file
You can change this behavior with the hostresorder keyword in /etc/resolv.conf. See the resolver(4) reference page for details.

To enable the system manager to copy files from another station when it is in single-user mode, the /etc/hosts file should contain entries for important stations in addition to the entries for the local station's network interface(s) and localhost. See the hosts(4) reference page for more information about the format.


Next | Prev | Up | Top | Contents | Index