increase size of search list array, but limit default to 3 anyway
[unix-history] / usr / src / share / man / man5 / resolver.5
CommitLineData
d58c18e3
KB
1.\" Copyright (c) 1986 The Regents of the University of California.
2.\" All rights reserved.
ba305536 3.\"
d58c18e3
KB
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.\"
e91b6c79 16.\" @(#)resolver.5 5.8 (Berkeley) %G%
56b0d82b
JB
17.\"
18.TH RESOLVER 5 ""
ba305536
KD
19.UC 4
20.SH NAME
d09d27e2 21resolver \- resolver configuration file
56b0d82b
JB
22.SH SYNOPSIS
23/etc/resolv.conf
ba305536
KD
24.SH DESCRIPTION
25.LP
e91b6c79
MK
26The
27.I resolver
28is a set of routines in the C library (\c
29.IR resolv (3))
30that provide access to the Internet Domain Name System.
ba305536 31The resolver configuration file contains information that is read
56b0d82b 32by the resolver routines the first time they are invoked by a process.
ba305536 33The file is designed to be human readable and contains a list of
e91b6c79 34keywords with values that provide various types of resolver information.
ba305536 35.LP
56b0d82b 36On a normally configured system this file should not be necessary.
e91b6c79
MK
37The only name server to be queried will be on the local machine,
38the domain name is determined from the host name,
39and the domain search path is constructed from the domain name.
56b0d82b 40.LP
ba305536
KD
41The different configuration options are:
42.TP
43\fBnameserver\fP
e91b6c79
MK
44Internet address (in dot notation) of a name server
45that the resolver should query.
46Up to MAXNS (currently 3) name servers may be listed,
47one per keyword.
48If there are multiple servers,
49the resolver library queries them in the order listed.
56b0d82b
JB
50If no \fBnameserver\fP entries are present,
51the default is to use the name server on the local machine.
e925f881 52(The algorithm used is to try a name server, and if the query times out,
56b0d82b
JB
53try the next, until out of name servers,
54then repeat trying all the name servers
e925f881 55until a maximum number of retries are made).
ba305536
KD
56.TP
57\fBdomain\fP
e91b6c79
MK
58Local domain name.
59Most queries for names within this domain can use short names
60relative to the local domain.
61If no \fBdomain\fP entry is present, the domain is determined
62from the local host name returned by
63\fIgethostname\fP\|(2);
64the domain part is taken to be everything after the first `.'.
56b0d82b
JB
65Finally, if the host name does not contain a domain part, the root
66domain is assumed.
e91b6c79
MK
67.TP
68\fBsearch\fP
69Search list for host-name lookup.
70The search list is normally determined from the local domain name;
71by default, it begins with the local domain name, then successive
72parent domains that have at least two components in their names.
73This may be changed by listing the desired domain search path
74following the \fIsearch\fP keyword with spaces or tabs separating
75the names.
76Most resolver queries will be attempted using each component
77of the search path in turn until a match is found.
78Note that this process may be slow and will generate a lot of network
79traffic if the servers for the listed domains are not local,
80and that queries will time out if no server is available
81for one of the domains.
82.LP
83The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive.
84If more than one instance of these keywords is present,
85the last instance will override.
ba305536 86.LP
e91b6c79 87The keyword and value must appear on a single line, and the keyword
ba305536 88(e.g. \fBnameserver\fP) must start the line. The value follows
e925f881 89the keyword, separated by white space.
ba305536
KD
90.SH FILES
91.I /etc/resolv.conf
92.SH SEE ALSO
e91b6c79 93gethostbyname(3N), resolver(3), hostname(7), named(8)
56b0d82b
JB
94.br
95Name Server Operations Guide for BIND