xref: /csrg-svn/share/man/man5/resolver.5 (revision 49647)
1*49647Scael.\" Copyright (c) 1986, 1991 The Regents of the University of California.
236741Sbostic.\" All rights reserved.
325718Skjd.\"
4*49647Scael.\" %sccs.include.redist.roff%
528206Sbloom.\"
6*49647Scael.\"     @(#)resolver.5	5.12 (Berkeley) 05/10/91
736741Sbostic.\"
8*49647Scael.Dd
9*49647Scael.Dt RESOLVER 5
10*49647Scael.Os BSD 4
11*49647Scael.Sh NAME
12*49647Scael.Nm resolver
13*49647Scael.Nd resolver configuration file
14*49647Scael.Sh SYNOPSIS
15*49647Scael.Nm resolv.conf
16*49647Scael.Sh DESCRIPTION
1739709SkarelsThe
18*49647Scael.Xr resolver 3
19*49647Scaelis a set of routines in the C library
20*49647Scaelwhich provide access to the Internet Domain Name System.
2125718SkjdThe resolver configuration file contains information that is read
2228206Sbloomby the resolver routines the first time they are invoked by a process.
2325718SkjdThe file is designed to be human readable and contains a list of
2439709Skarelskeywords with values that provide various types of resolver information.
25*49647Scael.Pp
2628206SbloomOn a normally configured system this file should not be necessary.
2739709SkarelsThe only name server to be queried will be on the local machine,
2839709Skarelsthe domain name is determined from the host name,
2939709Skarelsand the domain search path is constructed from the domain name.
30*49647Scael.Pp
3125718SkjdThe different configuration options are:
32*49647Scael.Bl -tag -width nameserver
33*49647Scael.It Sy nameserver
3439709SkarelsInternet address (in dot notation) of a name server
3539709Skarelsthat the resolver should query.
36*49647ScaelUp to
37*49647Scael.Dv MAXNS
38*49647Scael(currently 3) name servers may be listed,
3939709Skarelsone per keyword.
4039709SkarelsIf there are multiple servers,
4139709Skarelsthe resolver library queries them in the order listed.
42*49647ScaelIf no
43*49647Scael.Sy nameserver
44*49647Scaelentries are present,
4528206Sbloomthe default is to use the name server on the local machine.
4626927Skjd(The algorithm used is to try a name server, and if the query times out,
4728206Sbloomtry the next, until out of name servers,
4828206Sbloomthen repeat trying all the name servers
4926927Skjduntil a maximum number of retries are made).
50*49647Scael.It Sy domain
5139709SkarelsLocal domain name.
5239709SkarelsMost queries for names within this domain can use short names
5339709Skarelsrelative to the local domain.
54*49647ScaelIf no
55*49647Scael.Sy domain
56*49647Scaelentry is present, the domain is determined
5739709Skarelsfrom the local host name returned by
58*49647Scael.Xr gethostname 2 ;
5939709Skarelsthe domain part is taken to be everything after the first `.'.
6028206SbloomFinally, if the host name does not contain a domain part, the root
6128206Sbloomdomain is assumed.
62*49647Scael.It Sy search
6339709SkarelsSearch list for host-name lookup.
6439709SkarelsThe search list is normally determined from the local domain name;
6539709Skarelsby default, it begins with the local domain name, then successive
6639709Skarelsparent domains that have at least two components in their names.
6739709SkarelsThis may be changed by listing the desired domain search path
68*49647Scaelfollowing the
69*49647Scael.Sy search
70*49647Scaelkeyword with spaces or tabs separating
7139709Skarelsthe names.
7239709SkarelsMost resolver queries will be attempted using each component
7339709Skarelsof the search path in turn until a match is found.
7439709SkarelsNote that this process may be slow and will generate a lot of network
7539709Skarelstraffic if the servers for the listed domains are not local,
7639709Skarelsand that queries will time out if no server is available
7739709Skarelsfor one of the domains.
78*49647Scael.Pp
7939715SkarelsThe search list is currently limited to six domains
8039715Skarelswith a total of 256 characters.
81*49647Scael.El
82*49647Scael.Pp
83*49647ScaelThe
84*49647Scael.Sy domain
85*49647Scaeland
86*49647Scael.Sy search
87*49647Scaelkeywords are mutually exclusive.
8839709SkarelsIf more than one instance of these keywords is present,
8939709Skarelsthe last instance will override.
90*49647Scael.Pp
9139709SkarelsThe keyword and value must appear on a single line, and the keyword
92*49647Scael(e.g.
93*49647Scael.Sy nameserver )
94*49647Scaelmust start the line.  The value follows
9526927Skjdthe keyword, separated by white space.
96*49647Scael.Sh FILES
97*49647Scael.Bl -tag -width /etc/resolv.conf -compact
98*49647Scael.It Pa /etc/resolv.conf
99*49647ScaelThe file
100*49647Scael.Nm resolv.conf
101*49647Scaelresides in
102*49647Scael.Pa /etc .
103*49647Scael.El
104*49647Scael.Sh SEE ALSO
105*49647Scael.Xr gethostbyname 3 ,
106*49647Scael.Xr resolver 3 ,
107*49647Scael.Xr hostname 7 ,
108*49647Scael.Xr named 8
109*49647Scael.Rs
110*49647Scael.%T "Name Server Operations Guide for BIND"
111*49647Scael.Re
112*49647Scael.Sh HISTORY
113*49647ScaelThe
114*49647Scael.Nm resolv.conf
115*49647Scaelfile format appeared in
116*49647Scael.Bx 4.3 .
117