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