xref: /386bsd/usr/src/share/man/man5/resolver.5 (revision a2142627)
1.\" Copyright (c) 1986, 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)resolver.5	5.12 (Berkeley) 5/10/91
33.\"
34.Dd May 10, 1991
35.Dt RESOLVER 5
36.Os BSD 4
37.Sh NAME
38.Nm resolver
39.Nd resolver configuration file
40.Sh SYNOPSIS
41.Nm resolv.conf
42.Sh DESCRIPTION
43The
44.Xr resolver 3
45is a set of routines in the C library
46which provide access to the Internet Domain Name System.
47The resolver configuration file contains information that is read
48by the resolver routines the first time they are invoked by a process.
49The file is designed to be human readable and contains a list of
50keywords with values that provide various types of resolver information.
51.Pp
52On a normally configured system this file should not be necessary.
53The only name server to be queried will be on the local machine,
54the domain name is determined from the host name,
55and the domain search path is constructed from the domain name.
56.Pp
57The different configuration options are:
58.Bl -tag -width nameserver
59.It Sy nameserver
60Internet address (in dot notation) of a name server
61that the resolver should query.
62Up to
63.Dv MAXNS
64(currently 3) name servers may be listed,
65one per keyword.
66If there are multiple servers,
67the resolver library queries them in the order listed.
68If no
69.Sy nameserver
70entries are present,
71the default is to use the name server on the local machine.
72(The algorithm used is to try a name server, and if the query times out,
73try the next, until out of name servers,
74then repeat trying all the name servers
75until a maximum number of retries are made).
76.It Sy domain
77Local domain name.
78Most queries for names within this domain can use short names
79relative to the local domain.
80If no
81.Sy domain
82entry is present, the domain is determined
83from the local host name returned by
84.Xr gethostname 2 ;
85the domain part is taken to be everything after the first `.'.
86Finally, if the host name does not contain a domain part, the root
87domain is assumed.
88.It Sy search
89Search list for host-name lookup.
90The search list is normally determined from the local domain name;
91by default, it begins with the local domain name, then successive
92parent domains that have at least two components in their names.
93This may be changed by listing the desired domain search path
94following the
95.Sy search
96keyword with spaces or tabs separating
97the names.
98Most resolver queries will be attempted using each component
99of the search path in turn until a match is found.
100Note that this process may be slow and will generate a lot of network
101traffic if the servers for the listed domains are not local,
102and that queries will time out if no server is available
103for one of the domains.
104.Pp
105The search list is currently limited to six domains
106with a total of 256 characters.
107.El
108.Pp
109The
110.Sy domain
111and
112.Sy search
113keywords are mutually exclusive.
114If more than one instance of these keywords is present,
115the last instance will override.
116.Pp
117The keyword and value must appear on a single line, and the keyword
118(e.g.
119.Sy nameserver )
120must start the line.  The value follows
121the keyword, separated by white space.
122.Sh FILES
123.Bl -tag -width /etc/resolv.conf -compact
124.It Pa /etc/resolv.conf
125The file
126.Nm resolv.conf
127resides in
128.Pa /etc .
129.El
130.Sh SEE ALSO
131.Xr gethostbyname 3 ,
132.Xr resolver 3 ,
133.Xr hostname 7 ,
134.Xr named 8
135.Rs
136.%T "Name Server Operations Guide for BIND"
137.Re
138.Sh HISTORY
139The
140.Nm resolv.conf
141file format appeared in
142.Bx 4.3 .
143