nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man4 / resolv.conf.4
blob6555b4fe7aaffccb29e517ca5758cd0faa5eb91d
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" Copyright (c) 1983 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement  specifies the terms and conditions for redistribution.
5 .TH RESOLV.CONF 4 "Dec 15, 2004"
6 .SH NAME
7 resolv.conf \- resolver configuration file
8 .SH SYNOPSIS
9 .LP
10 .nf
11 \fB/etc/resolv.conf\fR
12 .fi
14 .SH DESCRIPTION
15 .sp
16 .LP
17 The \fBresolver\fR is a set of routines that provide access to the Internet
18 Domain Name System. See \fBresolver\fR(3RESOLV). \fBresolv.conf\fR is a
19 configuration file that contains the information that is read by the
20 \fBresolver\fR routines the first time they are invoked by a process. The file
21 is designed to be human readable and contains a list of keywords with values
22 that provide various types of \fBresolver\fR information.
23 .sp
24 .LP
25 The \fBresolv.conf\fR file contains the following configuration directives:
26 .sp
27 .ne 2
28 .na
29 \fB\fBnameserver\fR\fR
30 .ad
31 .RS 23n
32 Specifies the IPv4 or IPv6 Internet address of a name server that the resolver
33 is to query. Up to \fIMAXNS\fR name servers may be listed, one per keyword. See
34 <\fBresolv.h\fR>. If there are multiple servers, the resolver library queries
35 them in the order listed. If no name server entries are present, the resolver
36 library queries the name server on the local machine. The resolver library
37 follows the algorithm to try a name server until the query times out. It then
38 tries the name servers that follow, until each query times out. It repeats all
39 the name servers until a maximum number of retries are made.
40 .RE
42 .sp
43 .ne 2
44 .na
45 \fB\fBdomain\fR\fR
46 .ad
47 .RS 23n
48 Specifies the local domain name. Most queries for names within this domain can
49 use short names relative to the local domain. If no domain entry is present,
50 the domain is determined from \fBsysinfo\fR(2) or from \fBgethostname\fR(3C).
51 (Everything after the first `.' is presumed to be the domain name.) If the host
52 name does not contain a domain part, the root domain is assumed. You can use
53 the \fBLOCALDOMAIN\fR environment variable to override the domain name.
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fBsearch\fR\fR
60 .ad
61 .RS 23n
62 The search list for host name lookup. The search list is normally determined
63 from the local domain name. By default, it contains only the local domain name.
64 You can change the default behavior by listing the desired domain search path
65 following the search keyword, with spaces or tabs separating the names. Most
66 \fBresolver\fR queries will be attempted using each component of the search
67 path in turn until a match is found. This process may be slow and will generate
68 a lot of network traffic if the servers for the listed domains are not local.
69 Queries will time out if no server is available for one of the domains.
70 .sp
71 The search list is currently limited to six domains and a total of 256
72 characters.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fBsortlist\fR\fIaddresslist\fR\fR
79 .ad
80 .RS 23n
81 Allows addresses returned by the libresolv-internal \fBgethostbyname()\fR to be
82 sorted. A \fBsortlist\fR is specified by IP address netmask pairs. The netmask
83 is optional and defaults to the natural netmask of the net. The IP address and
84 optional network pairs are separated by slashes. Up to 10 pairs may be
85 specified. For example:
86 .sp
87 .in +2
88 .nf
89 sortlist 130.155.160.0/255.255.240.0 130.155.0.0
90 .fi
91 .in -2
92 .sp
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fBoptions\fR\fR
101 .RS 23n
102 Allows certain internal resolver variables to be modified. The syntax is
104 .in +2
106 options option ...
108 .in -2
111 where option is one of the following:
113 .ne 2
115 \fB\fBdebug\fR\fR
117 .RS 18n
118 Sets \fBRES_DEBUG\fR in the \fB_res.options\fR field.
122 .ne 2
124 \fB\fBndots:\fR\fIn\fR\fR
126 .RS 18n
127 Sets a threshold floor for the number of dots which must appear in a name given
128 to \fBres_query()\fR before an initial absolute (as-is) query is performed. See
129 \fBresolver\fR(3RESOLV). The default value for \fIn\fR is 1, which means that
130 if there are any dots in a name, the name is tried first as an absolute name
131 before any search list elements are appended to it.
135 .ne 2
137 \fB\fBtimeout:\fR\fIn\fR\fR
141 \fB\fBretrans:\fR\fIn\fR\fR
143 .RS 18n
144 Sets the amount of time the resolver will wait for a response from a remote
145 name server before retrying the query by means of a different name server.
146 Measured in seconds, the default is \fBRES_TIMEOUT\fR. See <\fBresolv.h\fR>.
147 The \fBtimeout\fR and \fBretrans\fR values are the starting point for an
148 exponential back off procedure where the \fBtimeout\fR is doubled for every
149 retransmit attempt.
153 .ne 2
155 \fB\fBattempts:\fR\fIn\fR\fR
159 \fB\fBretry:\fR\fIn\fR\fR
161 .RS 18n
162 Sets the number of times the resolver will send a query to its name servers
163 before giving up and returning an error to the calling application. The default
164 is \fBRES_DFLRETRY\fR. See <\fBresolv.h\fR>.
168 .ne 2
170 \fB\fBrotate\fR\fR
172 .RS 18n
173 Sets \fBRES_ROTATE\fR in \fB_res.options\fR. The name servers are queried
174 round-robin from among those listed. The query load is spread among all listed
175 servers, rather than having all clients try the first listed server first every
176 time.
180 .ne 2
182 \fB\fBno-check-names\fR\fR
184 .RS 18n
185 Sets \fBRES_NOCHECKNAME\fR in \fB_res.options\fR. This disables the modern BIND
186 checking of incoming host names and mail names for invalid characters such as
187 underscore (\fB_\fR), non-ASCII, or control characters.
191 .ne 2
193 \fB\fBinet6\fR\fR
195 .RS 18n
196 Sets \fBRES_USE_INET6\fR in \fB_res.options\fR. In the Solaris BIND port, this
197 has no effect on \fBgethostbyname\fR(3NSL). To retrieve IPv6 addresses or IPv4
198 addresses, use \fBgetaddrinfo\fR(3SOCKET) instead of setting \fBinet6\fR.
205 The \fBdomain\fR and \fBsearch\fR keywords are mutually exclusive. If more than
206 one instance of these keywords is present, the last instance takes precedence.
209 You can override the \fBsearch\fR keyword of the system \fBresolv.conf\fR file
210 on a per-process basis by setting the environment variable \fBLOCALDOMAIN\fR to
211 a space-separated list of search domains.
214 You can amend the \fBoptions\fR keyword of the system \fBresolv.conf\fR file on
215 a per-process basis by setting the environment variable \fBRES_OPTIONS\fR to a
216 space-separated list of resolver options.
219 The keyword and value must appear on a single line. Start the line with the
220 keyword, for example, \fBnameserver\fR, followed by the value, separated by
221 white space.
222 .SH FILES
224 .ne 2
226 \fB\fB/etc/resolv.conf\fR\fR
228 .RS 20n
232 .SH ATTRIBUTES
235 See \fBattributes\fR(5) for descriptions of the following attributes:
240 box;
241 c | c
242 l | l .
243 ATTRIBUTE TYPE  ATTRIBUTE VALUE
245 Interface Stability     Standard BIND 8.3.3
248 .SH SEE ALSO
251 \fBdomainname\fR(8), \fBsysinfo\fR(2), \fBgethostbyname\fR(3NSL),
252 \fBgetnameinfo\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),
253 \fBgethostname\fR(3C), \fBresolver\fR(3RESOLV), \fBattributes\fR(5)
256 Vixie, Paul, Dunlap, Keven J., Karels, Michael J. \fIName Server Operations
257 Guide for BIND\fR. Internet Software Consortium, 1996.