1resolv.conf(4)                   File Formats                   resolv.conf(4)
2
3
4

NAME

6       resolv.conf - resolver configuration file
7

SYNOPSIS

9       /etc/resolv.conf
10
11

DESCRIPTION

13       The  resolver  is a set of routines that provide access to the Internet
14       Domain Name System. See resolver(3RESOLV). resolv.conf is a  configura‐
15       tion  file  that  contains the information that is read by the resolver
16       routines the first time they are invoked by  a  process.  The  file  is
17       designed to be human readable and contains a list of keywords with val‐
18       ues that provide various types of resolver information.
19
20
21       The resolv.conf file contains the following configuration directives:
22
23       nameserver             Specifies the IPv4 or IPv6 Internet address of a
24                              name server that the resolver is to query. Up to
25                              MAXNS name servers may be listed, one  per  key‐
26                              word.  See  <resolv.h>.  If  there  are multiple
27                              servers, the resolver library  queries  them  in
28                              the  order listed. If no name server entries are
29                              present, the resolver library queries  the  name
30                              server   on  the  local  machine.  The  resolver
31                              library follows the  algorithm  to  try  a  name
32                              server  until the query times out. It then tries
33                              the name servers that follow, until  each  query
34                              times out. It repeats all the name servers until
35                              a maximum number of retries are made.
36
37
38       domain                 Specifies the local domain  name.  Most  queries
39                              for names within this domain can use short names
40                              relative to the local domain. If no domain entry
41                              is  present,  the domain is determined from sys‐
42                              info(2)  or  from  gethostname(3C).  (Everything
43                              after the first `.' is presumed to be the domain
44                              name.) If the  host  name  does  not  contain  a
45                              domain part, the root domain is assumed. You can
46                              use  the  LOCALDOMAIN  environment  variable  to
47                              override the domain name.
48
49
50       search                 The search list for host name lookup. The search
51                              list  is  normally  determined  from  the  local
52                              domain  name.  By  default, it contains only the
53                              local domain name. You can  change  the  default
54                              behavior  by  listing  the desired domain search
55                              path following the search keyword,  with  spaces
56                              or  tabs  separating  the  names.  Most resolver
57                              queries will be attempted using  each  component
58                              of  the  search  path  in  turn until a match is
59                              found. This process may be slow and will  gener‐
60                              ate  a lot of network traffic if the servers for
61                              the listed domains are not local.  Queries  will
62                              time  out  if  no server is available for one of
63                              the domains.
64
65                              The search list  is  currently  limited  to  six
66                              domains and a total of 256 characters.
67
68
69       sortlistaddresslist    Allows  addresses  returned  by  the  libresolv-
70                              internal  gethostbyname()  to   be   sorted.   A
71                              sortlist  is  specified  by  IP  address netmask
72                              pairs. The netmask is optional and  defaults  to
73                              the  natural  netmask of the net. The IP address
74                              and optional  network  pairs  are  separated  by
75                              slashes.  Up  to  10 pairs may be specified. For
76                              example:
77
78                                sortlist 130.155.160.0/255.255.240.0 130.155.0.0
79
80
81
82
83       options                Allows certain internal resolver variables to be
84                              modified. The syntax is
85
86                                options option ...
87
88
89                              where option is one of the following:
90
91                              debug             Sets    RES_DEBUG    in    the
92                                                _res.options field.
93
94
95                              ndots:n           Sets a threshold floor for the
96                                                number   of  dots  which  must
97                                                appear  in  a  name  given  to
98                                                res_query()  before an initial
99                                                absolute (as-is) query is per‐
100                                                formed. See resolver(3RESOLV).
101                                                The default value for n is  1,
102                                                which  means that if there are
103                                                any dots in a name,  the  name
104                                                is  tried first as an absolute
105                                                name before  any  search  list
106                                                elements are appended to it.
107
108
109                              timeout:n         Sets  the  amount  of time the
110                              retrans:n         resolver  will  wait   for   a
111                                                response  from  a  remote name
112                                                server  before  retrying   the
113                                                query  by means of a different
114                                                name server. Measured in  sec‐
115                                                onds, the default is RES_TIME‐
116                                                OUT. See <resolv.h>. The time‐
117                                                out and retrans values are the
118                                                starting point for an exponen‐
119                                                tial  back off procedure where
120                                                the  timeout  is  doubled  for
121                                                every retransmit attempt.
122
123
124                              attempts:n        Sets  the  number of times the
125                              retry:n           resolver will send a query  to
126                                                its name servers before giving
127                                                up and returning an  error  to
128                                                the  calling  application. The
129                                                default is  RES_DFLRETRY.  See
130                                                <resolv.h>.
131
132
133                              rotate            Sets       RES_ROTATE       in
134                                                _res.options. The name servers
135                                                are  queried  round-robin from
136                                                among those listed. The  query
137                                                load   is   spread  among  all
138                                                listed  servers,  rather  than
139                                                having  all  clients  try  the
140                                                first  listed   server   first
141                                                every time.
142
143
144                              no-check-names    Sets     RES_NOCHECKNAME    in
145                                                _res.options.  This   disables
146                                                the  modern  BIND  checking of
147                                                incoming host names  and  mail
148                                                names  for  invalid characters
149                                                such as underscore  (_),  non-
150                                                ASCII, or control characters.
151
152
153                              inet6             Sets      RES_USE_INET6     in
154                                                _res.options. In  the  Solaris
155                                                BIND  port, this has no effect
156                                                on   gethostbyname(3NSL).   To
157                                                retrieve   IPv6  addresses  or
158                                                IPv4  addresses,  use   getad‐
159                                                drinfo(3SOCKET)   instead   of
160                                                setting inet6.
161
162
163
164
165       The domain and search keywords are mutually exclusive. If more than one
166       instance  of  these keywords is present, the last instance takes prece‐
167       dence.
168
169
170       You can override the search keyword of the system resolv.conf file on a
171       per-process  basis by setting the environment variable LOCALDOMAIN to a
172       space-separated list of search domains.
173
174
175       You can amend the options keyword of the system resolv.conf file  on  a
176       per-process  basis by setting the environment variable RES_OPTIONS to a
177       space-separated list of resolver options.
178
179
180       The keyword and value must appear on a single line. Start the line with
181       the  keyword, for example, nameserver, followed by the value, separated
182       by white space.
183

FILES

185       /etc/resolv.conf
186
187

ATTRIBUTES

189       See attributes(5) for descriptions of the following attributes:
190
191
192
193
194       ┌─────────────────────────────┬─────────────────────────────┐
195       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
196       ├─────────────────────────────┼─────────────────────────────┤
197       │Interface Stability          │Standard BIND 8.3.3          │
198       └─────────────────────────────┴─────────────────────────────┘
199

SEE ALSO

201       domainname(1M), sysinfo(2), gethostbyname(3NSL),  getnameinfo(3SOCKET),
202       getipnodebyname(3SOCKET),      gethostname(3C),      resolver(3RESOLV),
203       attributes(5)
204
205
206       Vixie, Paul, Dunlap, Keven J., Karels, Michael J.  Name  Server  Opera‐
207       tions Guide for BIND. Internet Software Consortium, 1996.
208
209
210
211SunOS 5.11                        15 Dec 2004                   resolv.conf(4)
Impressum