1*61610Sbostic.\" Copyright (c) 1986, 1991, 1993 2*61610Sbostic.\" The Regents of the University of California. All rights reserved. 325718Skjd.\" 449647Scael.\" %sccs.include.redist.roff% 528206Sbloom.\" 6*61610Sbostic.\" @(#)resolver.5 8.1 (Berkeley) 06/05/93 736741Sbostic.\" 849647Scael.Dd 949647Scael.Dt RESOLVER 5 1049647Scael.Os BSD 4 1149647Scael.Sh NAME 1249647Scael.Nm resolver 1349647Scael.Nd resolver configuration file 1449647Scael.Sh SYNOPSIS 1549647Scael.Nm resolv.conf 1649647Scael.Sh DESCRIPTION 1739709SkarelsThe 1849647Scael.Xr resolver 3 1949647Scaelis a set of routines in the C library 2049647Scaelwhich 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. 2549647Scael.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. 3049647Scael.Pp 3125718SkjdThe different configuration options are: 3249647Scael.Bl -tag -width nameserver 3349647Scael.It Sy nameserver 3439709SkarelsInternet address (in dot notation) of a name server 3539709Skarelsthat the resolver should query. 3649647ScaelUp to 3749647Scael.Dv MAXNS 3849647Scael(currently 3) name servers may be listed, 3939709Skarelsone per keyword. 4039709SkarelsIf there are multiple servers, 4139709Skarelsthe resolver library queries them in the order listed. 4249647ScaelIf no 4349647Scael.Sy nameserver 4449647Scaelentries 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). 5049647Scael.It Sy domain 5139709SkarelsLocal domain name. 5239709SkarelsMost queries for names within this domain can use short names 5339709Skarelsrelative to the local domain. 5449647ScaelIf no 5549647Scael.Sy domain 5649647Scaelentry is present, the domain is determined 5739709Skarelsfrom the local host name returned by 5849647Scael.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. 6249647Scael.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 6849647Scaelfollowing the 6949647Scael.Sy search 7049647Scaelkeyword 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. 7849647Scael.Pp 7939715SkarelsThe search list is currently limited to six domains 8039715Skarelswith a total of 256 characters. 8149647Scael.El 8249647Scael.Pp 8349647ScaelThe 8449647Scael.Sy domain 8549647Scaeland 8649647Scael.Sy search 8749647Scaelkeywords are mutually exclusive. 8839709SkarelsIf more than one instance of these keywords is present, 8939709Skarelsthe last instance will override. 9049647Scael.Pp 9139709SkarelsThe keyword and value must appear on a single line, and the keyword 9249647Scael(e.g. 9349647Scael.Sy nameserver ) 9449647Scaelmust start the line. The value follows 9526927Skjdthe keyword, separated by white space. 9649647Scael.Sh FILES 9749647Scael.Bl -tag -width /etc/resolv.conf -compact 9849647Scael.It Pa /etc/resolv.conf 9949647ScaelThe file 10049647Scael.Nm resolv.conf 10149647Scaelresides in 10249647Scael.Pa /etc . 10349647Scael.El 10449647Scael.Sh SEE ALSO 10549647Scael.Xr gethostbyname 3 , 10649647Scael.Xr resolver 3 , 10749647Scael.Xr hostname 7 , 10849647Scael.Xr named 8 10949647Scael.Rs 11049647Scael.%T "Name Server Operations Guide for BIND" 11149647Scael.Re 11249647Scael.Sh HISTORY 11349647ScaelThe 11449647Scael.Nm resolv.conf 11549647Scaelfile format appeared in 11649647Scael.Bx 4.3 . 117