BSD 4_4_Lite1 release
[unix-history] / usr / src / contrib / bind-4.9.2 / man / resolver.5
CommitLineData
ed554bc5
C
1.\" Copyright (c) 1986 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)resolver.5 5.9 (Berkeley) 12/14/89
17.\" $Id: resolver.5,v 4.9.1.4 1993/12/06 00:42:59 vixie Exp $
18.\"
19.TH RESOLVER 5 ""November 11, 1993""
20.UC 4
21.SH NAME
22resolver \- resolver configuration file
23.SH SYNOPSIS
24/etc/resolv.conf
25.SH DESCRIPTION
26.LP
27The
28.I resolver
29is a set of routines in the C library (\c
30.IR resolv (3))
31that provide access to the Internet Domain Name System.
32The resolver configuration file contains information that is read
33by the resolver routines the first time they are invoked by a process.
34The file is designed to be human readable and contains a list of
35keywords with values that provide various types of resolver information.
36.LP
37On a normally configured system this file should not be necessary.
38The only name server to be queried will be on the local machine,
39the domain name is determined from the host name,
40and the domain search path is constructed from the domain name.
41.LP
42The different configuration options are:
43.TP
44\fBnameserver\fP
45Internet address (in dot notation) of a name server
46that the resolver should query.
47Up to MAXNS (currently 3) name servers may be listed,
48one per keyword.
49If there are multiple servers,
50the resolver library queries them in the order listed.
51If no \fBnameserver\fP entries are present,
52the default is to use the name server on the local machine.
53(The algorithm used is to try a name server, and if the query times out,
54try the next, until out of name servers,
55then repeat trying all the name servers
56until a maximum number of retries are made).
57.TP
58\fBdomain\fP
59Local domain name.
60Most queries for names within this domain can use short names
61relative to the local domain.
62If no \fBdomain\fP entry is present, the domain is determined
63from the local host name returned by
64\fIgethostname\fP\|(2);
65the domain part is taken to be everything after the first `.'.
66Finally, if the host name does not contain a domain part, the root
67domain is assumed.
68.TP
69\fBsearch\fP
70Search list for host-name lookup.
71The search list is normally determined from the local domain name;
72by default, it begins with the local domain name, then successive
73parent domains that have at least two components in their names.
74This may be changed by listing the desired domain search path
75following the \fIsearch\fP keyword with spaces or tabs separating
76the names.
77Most resolver queries will be attempted using each component
78of the search path in turn until a match is found.
79Note that this process may be slow and will generate a lot of network
80traffic if the servers for the listed domains are not local,
81and that queries will time out if no server is available
82for one of the domains.
83.IP
84The search list is currently limited to six domains
85with a total of 256 characters.
86.TP
87\fBsortlist\fP
88Sortlist allows addresses returned by gethostbyname to be sorted.
89A sortlist is specified by IP address netmask pairs. The netmask is
90optional and defaults to the natural netmask of the net. The IP address
91and optional network pairs are seperated by slashes. Up to 10 pairs may
92be specified.
93.IP
94e.g. sortlist 130.155.160.0/255.255.240.0 130.155.0.0
95.TP
96\fBoptions\fP
97Options allows certain internal resolver variables to be modified.
98The syntax is
99.IP
100\fBoptions\fP \fIoption\fP \fI...\fP
101.IP
102where \fIoption\fP is one of the following:
103.IP
104\fBdebug\fP \(em sets RES_DEBUG in _res.options.
105.IP
106\fBndots:\fP\fIn\fP \(em sets a threshold for the number of dots which
107must appear in a name given to \fBres_query\fP (see \fIresolver\fP(3))
108before an \fIinitial absolute query\fP will be made. The default for
109\fIn\fP is ``1'', meaning that if there are any dots in a name, the name
110will be tried first as an absolute name before any \fIsearch list\fP
111elements are appended to it.
112.LP
113The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive.
114If more than one instance of these keywords is present,
115the last instance wins.
116.LP
117The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be
118overridden on a per-process basis by setting the environment variable
119``\s-1LOCALDOMAIN\s+1'' to a space-separated list of search domains.
120.LP
121The \fIoptions\fP keyword of a system's \fIresolv.conf\fP file can be
122amended on a per-process basis by setting the environment variable
123``\s-1RES_OPTIONS\s+1'' to a space-separated list of resolver options
124as explained above under \fBoptions\fP.
125.LP
126The keyword and value must appear on a single line, and the keyword
127(e.g. \fBnameserver\fP) must start the line. The value follows
128the keyword, separated by white space.
129.SH FILES
130.I /etc/resolv.conf
131.SH SEE ALSO
132gethostbyname(3N), resolver(3), hostname(7), named(8)
133.br
134Name Server Operations Guide for BIND