Commit | Line | Data |
---|---|---|
eadcc84a | 1 | .\" Copyright (c) 1986, 1991 The Regents of the University of California. |
d58c18e3 | 2 | .\" All rights reserved. |
ba305536 | 3 | .\" |
eadcc84a | 4 | .\" %sccs.include.redist.roff% |
d58c18e3 | 5 | .\" |
eadcc84a | 6 | .\" @(#)resolver.5 5.12 (Berkeley) %G% |
56b0d82b | 7 | .\" |
eadcc84a CL |
8 | .Dd |
9 | .Dt RESOLVER 5 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm resolver | |
13 | .Nd resolver configuration file | |
14 | .Sh SYNOPSIS | |
15 | .Nm resolv.conf | |
16 | .Sh DESCRIPTION | |
e91b6c79 | 17 | The |
eadcc84a CL |
18 | .Xr resolver 3 |
19 | is a set of routines in the C library | |
20 | which provide access to the Internet Domain Name System. | |
ba305536 | 21 | The resolver configuration file contains information that is read |
56b0d82b | 22 | by the resolver routines the first time they are invoked by a process. |
ba305536 | 23 | The file is designed to be human readable and contains a list of |
e91b6c79 | 24 | keywords with values that provide various types of resolver information. |
eadcc84a | 25 | .Pp |
56b0d82b | 26 | On a normally configured system this file should not be necessary. |
e91b6c79 MK |
27 | The only name server to be queried will be on the local machine, |
28 | the domain name is determined from the host name, | |
29 | and the domain search path is constructed from the domain name. | |
eadcc84a | 30 | .Pp |
ba305536 | 31 | The different configuration options are: |
eadcc84a CL |
32 | .Bl -tag -width nameserver |
33 | .It Sy nameserver | |
e91b6c79 MK |
34 | Internet address (in dot notation) of a name server |
35 | that the resolver should query. | |
eadcc84a CL |
36 | Up to |
37 | .Dv MAXNS | |
38 | (currently 3) name servers may be listed, | |
e91b6c79 MK |
39 | one per keyword. |
40 | If there are multiple servers, | |
41 | the resolver library queries them in the order listed. | |
eadcc84a CL |
42 | If no |
43 | .Sy nameserver | |
44 | entries are present, | |
56b0d82b | 45 | the default is to use the name server on the local machine. |
e925f881 | 46 | (The algorithm used is to try a name server, and if the query times out, |
56b0d82b JB |
47 | try the next, until out of name servers, |
48 | then repeat trying all the name servers | |
e925f881 | 49 | until a maximum number of retries are made). |
eadcc84a | 50 | .It Sy domain |
e91b6c79 MK |
51 | Local domain name. |
52 | Most queries for names within this domain can use short names | |
53 | relative to the local domain. | |
eadcc84a CL |
54 | If no |
55 | .Sy domain | |
56 | entry is present, the domain is determined | |
e91b6c79 | 57 | from the local host name returned by |
eadcc84a | 58 | .Xr gethostname 2 ; |
e91b6c79 | 59 | the domain part is taken to be everything after the first `.'. |
56b0d82b JB |
60 | Finally, if the host name does not contain a domain part, the root |
61 | domain is assumed. | |
eadcc84a | 62 | .It Sy search |
e91b6c79 MK |
63 | Search list for host-name lookup. |
64 | The search list is normally determined from the local domain name; | |
65 | by default, it begins with the local domain name, then successive | |
66 | parent domains that have at least two components in their names. | |
67 | This may be changed by listing the desired domain search path | |
eadcc84a CL |
68 | following the |
69 | .Sy search | |
70 | keyword with spaces or tabs separating | |
e91b6c79 MK |
71 | the names. |
72 | Most resolver queries will be attempted using each component | |
73 | of the search path in turn until a match is found. | |
74 | Note that this process may be slow and will generate a lot of network | |
75 | traffic if the servers for the listed domains are not local, | |
76 | and that queries will time out if no server is available | |
77 | for one of the domains. | |
eadcc84a | 78 | .Pp |
bddb61e0 MK |
79 | The search list is currently limited to six domains |
80 | with a total of 256 characters. | |
eadcc84a CL |
81 | .El |
82 | .Pp | |
83 | The | |
84 | .Sy domain | |
85 | and | |
86 | .Sy search | |
87 | keywords are mutually exclusive. | |
e91b6c79 MK |
88 | If more than one instance of these keywords is present, |
89 | the last instance will override. | |
eadcc84a | 90 | .Pp |
e91b6c79 | 91 | The keyword and value must appear on a single line, and the keyword |
eadcc84a CL |
92 | (e.g. |
93 | .Sy nameserver ) | |
94 | must start the line. The value follows | |
e925f881 | 95 | the keyword, separated by white space. |
eadcc84a CL |
96 | .Sh FILES |
97 | .Bl -tag -width /etc/resolv.conf -compact | |
98 | .It Pa /etc/resolv.conf | |
99 | The file | |
100 | .Nm resolv.conf | |
101 | resides in | |
102 | .Pa /etc . | |
103 | .El | |
104 | .Sh SEE ALSO | |
105 | .Xr gethostbyname 3 , | |
106 | .Xr resolver 3 , | |
107 | .Xr hostname 7 , | |
108 | .Xr named 8 | |
109 | .Rs | |
110 | .%T "Name Server Operations Guide for BIND" | |
111 | .Re | |
112 | .Sh HISTORY | |
113 | The | |
114 | .Nm resolv.conf | |
115 | file format appeared in | |
116 | .Bx 4.3 . |