| 1 | .\" Copyright (c) 1986, 1991 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" %sccs.include.redist.roff% |
| 5 | .\" |
| 6 | .\" @(#)resolver.5 5.12 (Berkeley) %G% |
| 7 | .\" |
| 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 |
| 17 | The |
| 18 | .Xr resolver 3 |
| 19 | is a set of routines in the C library |
| 20 | which provide access to the Internet Domain Name System. |
| 21 | The resolver configuration file contains information that is read |
| 22 | by the resolver routines the first time they are invoked by a process. |
| 23 | The file is designed to be human readable and contains a list of |
| 24 | keywords with values that provide various types of resolver information. |
| 25 | .Pp |
| 26 | On a normally configured system this file should not be necessary. |
| 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. |
| 30 | .Pp |
| 31 | The different configuration options are: |
| 32 | .Bl -tag -width nameserver |
| 33 | .It Sy nameserver |
| 34 | Internet address (in dot notation) of a name server |
| 35 | that the resolver should query. |
| 36 | Up to |
| 37 | .Dv MAXNS |
| 38 | (currently 3) name servers may be listed, |
| 39 | one per keyword. |
| 40 | If there are multiple servers, |
| 41 | the resolver library queries them in the order listed. |
| 42 | If no |
| 43 | .Sy nameserver |
| 44 | entries are present, |
| 45 | the default is to use the name server on the local machine. |
| 46 | (The algorithm used is to try a name server, and if the query times out, |
| 47 | try the next, until out of name servers, |
| 48 | then repeat trying all the name servers |
| 49 | until a maximum number of retries are made). |
| 50 | .It Sy domain |
| 51 | Local domain name. |
| 52 | Most queries for names within this domain can use short names |
| 53 | relative to the local domain. |
| 54 | If no |
| 55 | .Sy domain |
| 56 | entry is present, the domain is determined |
| 57 | from the local host name returned by |
| 58 | .Xr gethostname 2 ; |
| 59 | the domain part is taken to be everything after the first `.'. |
| 60 | Finally, if the host name does not contain a domain part, the root |
| 61 | domain is assumed. |
| 62 | .It Sy search |
| 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 |
| 68 | following the |
| 69 | .Sy search |
| 70 | keyword with spaces or tabs separating |
| 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. |
| 78 | .Pp |
| 79 | The search list is currently limited to six domains |
| 80 | with a total of 256 characters. |
| 81 | .El |
| 82 | .Pp |
| 83 | The |
| 84 | .Sy domain |
| 85 | and |
| 86 | .Sy search |
| 87 | keywords are mutually exclusive. |
| 88 | If more than one instance of these keywords is present, |
| 89 | the last instance will override. |
| 90 | .Pp |
| 91 | The keyword and value must appear on a single line, and the keyword |
| 92 | (e.g. |
| 93 | .Sy nameserver ) |
| 94 | must start the line. The value follows |
| 95 | the keyword, separated by white space. |
| 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 . |