1 .\" $NetBSD: resolv.conf.5,v 1.23 2003/09/07 16:22:29 wiz Exp $
3 .\" Copyright (c) 1986, 1991 The Regents of the University of California.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)resolver.5 5.12 (Berkeley) 5/10/91
37 .Nd resolver configuration file
41 file specifies how the
43 routines in the C library
44 (which provide access to the Internet Domain Name System) should operate.
45 The resolver configuration file contains information that is read
46 by the resolver routines the first time they are invoked by a process.
47 The file is designed to be human readable and contains a list of
48 keywords with values that provide various types of resolver information.
50 On a normally configured system this file should not be necessary.
51 The only name server to be queried will be on the local machine,
52 the domain name is determined from the host name,
53 and the domain search path is constructed from the domain name.
55 The different configuration options are:
56 .Bl -tag -width nameserver
61 .Pq in hex-and-colon notation
62 of a name server that the resolver should query.
63 Scoped IPv6 address notation is accepted as well
71 (currently 3) name servers may be listed,
73 If there are multiple servers,
74 the resolver library queries them in the order listed.
78 the default is to use the name server on the local machine.
79 (The algorithm used is to try a name server, and if the query times out,
80 try the next, until out of name servers,
81 then repeat trying all the name servers
82 until a maximum number of retries are made).
85 Most queries for names within this domain can use short names
86 relative to the local domain.
89 entry is present, the domain is determined
90 from the local host name returned by
92 the domain part is taken to be everything after the first `.'.
93 Finally, if the host name does not contain a domain part, the root
96 This keyword is now ignored: its function has been superseded by
101 Search list for host-name lookup.
102 The search list is normally determined from the local domain name;
103 by default, it begins with the local domain name, then successive
104 parent domains that have at least two components in their names.
105 This may be changed by listing the desired domain search path
108 keyword with spaces or tabs separating
110 Most resolver queries will be attempted using each component
111 of the search path in turn until a match is found.
112 Note that this process may be slow and will generate a lot of network
113 traffic if the servers for the listed domains are not local,
114 and that queries will time out if no server is available
115 for one of the domains.
117 The search list is currently limited to six domains
118 with a total of 1024 characters.
120 Sortlist allows addresses returned by gethostbyname to
122 A sortlist is specified by IP address netmask pairs.
123 The netmask is optional and defaults to the natural
125 The IP address and optional network pairs are separated by
127 Up to 10 pairs may be specified, ie.
129 .Sy sortlist 130.155.160.0/255.255.240.0 130.155.0.0
131 Options allows certain internal resolver variables to be modified.
134 .Sy options option ...
136 where option is one of the following:
137 .Bl -tag -width insecure1
139 enable debugging information, by setting RES_DEBUG in _res.options
143 attach OPT pseudo-RR for ENDS0 extension specified in RFC 2671,
144 to inform DNS server of our receive buffer size.
145 The option will allow DNS servers to take advantage of non-default receive
146 buffer size, and to send larger replies.
147 DNS query packets with EDNS0 extension is not compatible with
148 non-EDNS0 DNS servers.
149 The option must be used only when all the DNS servers listed in
151 lines are able to handle EDNS0 extension.
153 enable support for IPv6-only applications, by setting RES_USE_INET6 in
156 The option is meaningful with certain kernel configuration only and
157 use of this option is discouraged.
159 Do not require IP source address on the reply packet to be equal to the
162 Do not check if the query section of the reply packet is equal
163 to that of the query packet.
164 For testing purposes only.
166 sets a threshold for the number of dots which
167 must appear in a name given to res_query (see
169 before an initial absolute query will be made.
170 The default for n is 1, meaning that if there are any
171 dots in a name, the name will be tried first as an absolute
172 name before any search list elements are appended to it.
180 keywords are mutually exclusive.
181 If more than one instance of these keywords is present,
182 the last instance will override.
186 keyword of a system's
188 file can be overridden on a per-process basis by setting the
191 to a space-separated list of search domains.
195 keyword of a system's
197 file can be amended on a per-process basis by setting the
200 to a space-separated list of resolver options as explained above.
202 The keyword and value must appear on a single line, and the keyword
205 must start the line. The value follows
206 the keyword, separated by white space.
208 .Bl -tag -width /etc/resolv.conf -compact
209 .It Pa /etc/resolv.conf
216 .Xr gethostbyname 3 ,
218 .Xr nsswitch.conf 5 ,
222 .%T "Name Server Operations Guide for BIND"
227 file format appeared in