Commit | Line | Data |
---|---|---|
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 | |
22 | resolver \- resolver configuration file | |
23 | .SH SYNOPSIS | |
24 | /etc/resolv.conf | |
25 | .SH DESCRIPTION | |
26 | .LP | |
27 | The | |
28 | .I resolver | |
29 | is a set of routines in the C library (\c | |
30 | .IR resolv (3)) | |
31 | that provide access to the Internet Domain Name System. | |
32 | The resolver configuration file contains information that is read | |
33 | by the resolver routines the first time they are invoked by a process. | |
34 | The file is designed to be human readable and contains a list of | |
35 | keywords with values that provide various types of resolver information. | |
36 | .LP | |
37 | On a normally configured system this file should not be necessary. | |
38 | The only name server to be queried will be on the local machine, | |
39 | the domain name is determined from the host name, | |
40 | and the domain search path is constructed from the domain name. | |
41 | .LP | |
42 | The different configuration options are: | |
43 | .TP | |
44 | \fBnameserver\fP | |
45 | Internet address (in dot notation) of a name server | |
46 | that the resolver should query. | |
47 | Up to MAXNS (currently 3) name servers may be listed, | |
48 | one per keyword. | |
49 | If there are multiple servers, | |
50 | the resolver library queries them in the order listed. | |
51 | If no \fBnameserver\fP entries are present, | |
52 | the 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, | |
54 | try the next, until out of name servers, | |
55 | then repeat trying all the name servers | |
56 | until a maximum number of retries are made). | |
57 | .TP | |
58 | \fBdomain\fP | |
59 | Local domain name. | |
60 | Most queries for names within this domain can use short names | |
61 | relative to the local domain. | |
62 | If no \fBdomain\fP entry is present, the domain is determined | |
63 | from the local host name returned by | |
64 | \fIgethostname\fP\|(2); | |
65 | the domain part is taken to be everything after the first `.'. | |
66 | Finally, if the host name does not contain a domain part, the root | |
67 | domain is assumed. | |
68 | .TP | |
69 | \fBsearch\fP | |
70 | Search list for host-name lookup. | |
71 | The search list is normally determined from the local domain name; | |
72 | by default, it begins with the local domain name, then successive | |
73 | parent domains that have at least two components in their names. | |
74 | This may be changed by listing the desired domain search path | |
75 | following the \fIsearch\fP keyword with spaces or tabs separating | |
76 | the names. | |
77 | Most resolver queries will be attempted using each component | |
78 | of the search path in turn until a match is found. | |
79 | Note that this process may be slow and will generate a lot of network | |
80 | traffic if the servers for the listed domains are not local, | |
81 | and that queries will time out if no server is available | |
82 | for one of the domains. | |
83 | .IP | |
84 | The search list is currently limited to six domains | |
85 | with a total of 256 characters. | |
86 | .TP | |
87 | \fBsortlist\fP | |
88 | Sortlist allows addresses returned by gethostbyname to be sorted. | |
89 | A sortlist is specified by IP address netmask pairs. The netmask is | |
90 | optional and defaults to the natural netmask of the net. The IP address | |
91 | and optional network pairs are seperated by slashes. Up to 10 pairs may | |
92 | be specified. | |
93 | .IP | |
94 | e.g. sortlist 130.155.160.0/255.255.240.0 130.155.0.0 | |
95 | .TP | |
96 | \fBoptions\fP | |
97 | Options allows certain internal resolver variables to be modified. | |
98 | The syntax is | |
99 | .IP | |
100 | \fBoptions\fP \fIoption\fP \fI...\fP | |
101 | .IP | |
102 | where \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 | |
107 | must appear in a name given to \fBres_query\fP (see \fIresolver\fP(3)) | |
108 | before 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 | |
110 | will be tried first as an absolute name before any \fIsearch list\fP | |
111 | elements are appended to it. | |
112 | .LP | |
113 | The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive. | |
114 | If more than one instance of these keywords is present, | |
115 | the last instance wins. | |
116 | .LP | |
117 | The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be | |
118 | overridden 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 | |
121 | The \fIoptions\fP keyword of a system's \fIresolv.conf\fP file can be | |
122 | amended on a per-process basis by setting the environment variable | |
123 | ``\s-1RES_OPTIONS\s+1'' to a space-separated list of resolver options | |
124 | as explained above under \fBoptions\fP. | |
125 | .LP | |
126 | The keyword and value must appear on a single line, and the keyword | |
127 | (e.g. \fBnameserver\fP) must start the line. The value follows | |
128 | the keyword, separated by white space. | |
129 | .SH FILES | |
130 | .I /etc/resolv.conf | |
131 | .SH SEE ALSO | |
132 | gethostbyname(3N), resolver(3), hostname(7), named(8) | |
133 | .br | |
134 | Name Server Operations Guide for BIND |