1 .\" $OpenBSD: resolver.5,v 1.2 1997/03/12 10:42:19 downsj Exp $
2 .\" Copyright (c) 1986 The Regents of the University of California.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms are permitted
6 .\" provided that the above copyright notice and this paragraph are
7 .\" duplicated in all such forms and that any documentation,
8 .\" advertising materials, and other materials related to such
9 .\" distribution and use acknowledge that the software was developed
10 .\" by the University of California, Berkeley. The name of the
11 .\" University may not be used to endorse or promote products derived
12 .\" from this software without specific prior written permission.
13 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 .\" Portions Copyright (c) 2003 by Apple Computer, Inc.
19 .\" @(#)resolver.5 5.9 (Berkeley) 12/14/89
20 .\" $From: resolver.5,v 8.3 1995/12/06 20:34:35 vixie Exp $
27 .Nd resolver configuration file format
31 is a set of routines in the C library
33 that provide access to the Internet Domain Name System (DNS).
34 A resolver configuration file contains information used to specify parameters
35 for a DNS resolver client.
36 The file contains a list of keywords with values that provide various types
37 of resolver information.
39 Mac OS X supports a DNS search strategy that may involve multiple
43 section below for an overview of multi-client DNS
46 Each DNS client is configured using the contents of a single configuration
47 file of the format described below, or from a property list supplied from
48 some other system configuration database.
51 file, which contains configuration for the default (or "primary") DNS resolver client,
52 is maintained automatically by Mac OS X and should not be edited manually.
53 Changes to the DNS configuration should be made by using the Network
56 The different configuration options are given below.
58 Internet address (in dot notation for IPv4 or in colon notation for IPv6)
59 of a name server that the resolver should query.
60 The address may optionally have a trailing dot followed by a port number.
63 specifies that the nameserver at 10.0.0.17
68 (currently 3) name servers may be listed,
70 If there are multiple servers,
71 the resolver library queries them in the order listed.
72 The algorithm used is to try a name server, and if the query times out,
73 try the next, until out of name servers,
74 then repeat trying all the name servers
75 until a maximum number of retries are made.
77 IP port number to be used for this resolver.
78 The default port is 53.
79 The port number for an individual nameserver may be specified as
80 part of the nameserver address (see
82 above) to override the default
83 or the port number specified as a value for this keyword.
85 Domain name associated with this resolver configuration.
86 This option is normally not required by the Mac OS X DNS search system
87 when the resolver configuration is read from a file in the
90 In that case the file name is used as the domain name.
93 must be provided when there are
94 multiple resolver clients for the same domain name, since multiple
95 files may not exist having the same name.
98 section for more details.
100 Search list for host-name lookup.
101 This parameter is only used by the "Super" DNS resolver, which
102 manages the DNS search strategy amongst multiple DNS resolver clients.
103 Unqualified queries will be attempted using each component
104 of the search list in turn until a match is found.
105 Note that this process may be slow and will generate a lot of network
106 traffic if the servers for the listed domains are not local,
107 and that queries will time out if no server is available
108 for one of the domains.
110 The search list is currently limited to six domains
111 with a total of 256 characters.
113 Only required for those clients that share a domain name with other clients.
114 Queries will be sent to these clients in order by ascending
117 For example, this allows two clients for the ".local"
118 domain, which is used by Apple's multicast DNS, but which may
119 also be used at some sites as private DNS domain name.
121 Sortlist allows addresses returned by gethostbyname to be sorted.
122 A sortlist is specified by IP address netmask pairs. The netmask is
123 optional and defaults to the natural netmask of the net. The IP address
124 and optional network pairs are separated by slashes. Up to 10 pairs may
125 be specified. For example:
126 .Bd -literal -offset indent
127 sortlist 130.155.160.0/255.255.240.0 130.155.0.0
130 Specifies the total amount of time allowed for a name resolution.
131 This time interval is divided by the number of nameservers and the number
132 of retries allowed for each nameserver.
134 Options allows certain internal resolver variables to be modified.
142 is one of the following:
143 .Bl -tag -width -indent
147 in the resolver options.
149 sets the per-retry timeout for resolver queries.
150 The total timeout allowed for a query depends on the number of retries and the
151 number of nameservers. This value is ignored if a total timeout is specified
156 Sets a threshold for the number of dots which
157 must appear in a name given to
161 before an initial absolute query will be made. The default for
163 is ``1'', meaning that if there are any dots in a name, the name
164 will be tried first as an absolute name before any
166 list elements are appended to it.
168 The keyword and value must appear on a single line,
169 and the keyword must start the line.
170 The value follows the keyword, separated by white space.
173 Mac OS X uses a DNS search strategy that supports multiple DNS
174 client configurations.
175 Each DNS client has its own set of nameserver
176 addresses and its own set of operational parameters.
177 Each client can perform DNS queries and searches independent of other clients.
178 Each client has a symbolic name which is of the same format as a
179 domain name, e.g. "apple.com".
180 A special meta-client, known as the
181 "Super" DNS client acts as a router for DNS queries.
182 The Super client chooses among all available clients by finding a best match
183 between the domain name given in a query and the names of all known clients.
185 Queries for qualified names
186 are sent using a client configuration
187 that best matches the domain name given in the query.
188 For example, if there is a client named "apple.com", a search for
189 "www.apple.com" would use the resolver configuration specified for that client.
190 The matching algorithm chooses the client with the maximum number of matching
192 For example, if there are clients named "a.b.c", and "b.c", a search for
193 "x.a.b.c" would use the "a.b.c" resolver configuration, while a search
194 for "x.y.b.c" would use the "b.c" client.
195 If there are no matches, the configuration settings in the default client,
196 generally corresponding to the
198 file or to the "primary" DNS
199 configuration on the system are used for the query.
201 If multiple clients are available for the same domain name, the clients ordered
205 Queries are sent to these resolvers in sequence by ascending value of
208 The configuration for a particular client may be read from a file
209 having the format described in this man page.
210 These are at present located by the system in the
213 in the files found in the
216 However, client configurations are not limited to file storage.
217 The implementation of the DNS multi-client search strategy may also locate
218 client configuratins in other data sources, such as the System Configuration
220 Users of the DNS system should make no assumptions about the
221 source of the configuration data.
223 /etc/resolv.conf, /etc/resolver/*
225 gethostbyname(2), getaddrinfo(3), resolver(3)