]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/bin/named/named.html
MFC r363988:
[FreeBSD/stable/9.git] / contrib / bind9 / bin / named / named.html
1 <!--
2  - Copyright (C) 2004-2009, 2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and/or distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  - 
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17 <html>
18 <head>
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>named</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
22 </head>
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="man.named"></a><div class="titlepage"></div>
25 <div class="refnamediv">
26 <h2>Name</h2>
27 <p><span class="application">named</span> &#8212; Internet domain name server</p>
28 </div>
29 <div class="refsynopsisdiv">
30 <h2>Synopsis</h2>
31 <div class="cmdsynopsis"><p><code class="command">named</code>  [<code class="option">-4</code>] [<code class="option">-6</code>] [<code class="option">-c <em class="replaceable"><code>config-file</code></em></code>] [<code class="option">-d <em class="replaceable"><code>debug-level</code></em></code>] [<code class="option">-E <em class="replaceable"><code>engine-name</code></em></code>] [<code class="option">-f</code>] [<code class="option">-g</code>] [<code class="option">-M <em class="replaceable"><code>option</code></em></code>] [<code class="option">-m <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-n <em class="replaceable"><code>#cpus</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port</code></em></code>] [<code class="option">-s</code>] [<code class="option">-S <em class="replaceable"><code>#max-socks</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-U <em class="replaceable"><code>#listeners</code></em></code>] [<code class="option">-u <em class="replaceable"><code>user</code></em></code>] [<code class="option">-v</code>] [<code class="option">-V</code>] [<code class="option">-x <em class="replaceable"><code>cache-file</code></em></code>]</p></div>
32 </div>
33 <div class="refsection">
34 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
35 <p><span class="command"><strong>named</strong></span>
36       is a Domain Name System (DNS) server,
37       part of the BIND 9 distribution from ISC.  For more
38       information on the DNS, see RFCs 1033, 1034, and 1035.
39     </p>
40 <p>
41       When invoked without arguments, <span class="command"><strong>named</strong></span>
42       will
43       read the default configuration file
44       <code class="filename">/etc/named.conf</code>, read any initial
45       data, and listen for queries.
46     </p>
47 </div>
48 <div class="refsection">
49 <a name="id-1.8"></a><h2>OPTIONS</h2>
50 <div class="variablelist"><dl class="variablelist">
51 <dt><span class="term">-4</span></dt>
52 <dd><p>
53             Use IPv4 only even if the host machine is capable of IPv6.
54             <code class="option">-4</code> and <code class="option">-6</code> are mutually
55             exclusive.
56           </p></dd>
57 <dt><span class="term">-6</span></dt>
58 <dd><p>
59             Use IPv6 only even if the host machine is capable of IPv4.
60             <code class="option">-4</code> and <code class="option">-6</code> are mutually
61             exclusive.
62           </p></dd>
63 <dt><span class="term">-c <em class="replaceable"><code>config-file</code></em></span></dt>
64 <dd><p>
65             Use <em class="replaceable"><code>config-file</code></em> as the
66             configuration file instead of the default,
67             <code class="filename">/etc/named.conf</code>.  To
68             ensure that reloading the configuration file continues
69             to work after the server has changed its working
70             directory due to to a possible
71             <code class="option">directory</code> option in the configuration
72             file, <em class="replaceable"><code>config-file</code></em> should be
73             an absolute pathname.
74           </p></dd>
75 <dt><span class="term">-d <em class="replaceable"><code>debug-level</code></em></span></dt>
76 <dd><p>
77             Set the daemon's debug level to <em class="replaceable"><code>debug-level</code></em>.
78             Debugging traces from <span class="command"><strong>named</strong></span> become
79             more verbose as the debug level increases.
80           </p></dd>
81 <dt><span class="term">-E <em class="replaceable"><code>engine-name</code></em></span></dt>
82 <dd><p>
83             Use a crypto hardware (OpenSSL engine) for the crypto operations
84             it supports, for instance re-signing with private keys from
85             a secure key store. When compiled with PKCS#11 support
86             <em class="replaceable"><code>engine-name</code></em>
87             defaults to pkcs11, the empty name resets it to no engine.
88           </p></dd>
89 <dt><span class="term">-f</span></dt>
90 <dd><p>
91             Run the server in the foreground (i.e. do not daemonize).
92           </p></dd>
93 <dt><span class="term">-g</span></dt>
94 <dd><p>
95             Run the server in the foreground and force all logging
96             to <code class="filename">stderr</code>.
97           </p></dd>
98 <dt><span class="term">-M <em class="replaceable"><code>option</code></em></span></dt>
99 <dd><p>
100             Sets the default memory context options.  Currently
101             the only supported option is
102             <em class="replaceable"><code>external</code></em>,
103             which causes the internal memory manager to be bypassed
104             in favor of system-provided memory allocation functions.
105           </p></dd>
106 <dt><span class="term">-m <em class="replaceable"><code>flag</code></em></span></dt>
107 <dd><p>
108             Turn on memory usage debugging flags.  Possible flags are
109             <em class="replaceable"><code>usage</code></em>,
110             <em class="replaceable"><code>trace</code></em>,
111             <em class="replaceable"><code>record</code></em>,
112             <em class="replaceable"><code>size</code></em>, and
113             <em class="replaceable"><code>mctx</code></em>.
114             These correspond to the ISC_MEM_DEBUGXXXX flags described in
115             <code class="filename">&lt;isc/mem.h&gt;</code>.
116           </p></dd>
117 <dt><span class="term">-n <em class="replaceable"><code>#cpus</code></em></span></dt>
118 <dd><p>
119             Create <em class="replaceable"><code>#cpus</code></em> worker threads
120             to take advantage of multiple CPUs.  If not specified,
121             <span class="command"><strong>named</strong></span> will try to determine the
122             number of CPUs present and create one thread per CPU.
123             If it is unable to determine the number of CPUs, a
124             single worker thread will be created.
125           </p></dd>
126 <dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
127 <dd><p>
128             Listen for queries on port <em class="replaceable"><code>port</code></em>.  If not
129             specified, the default is port 53.
130           </p></dd>
131 <dt><span class="term">-s</span></dt>
132 <dd>
133 <p>
134             Write memory usage statistics to <code class="filename">stdout</code> on exit.
135           </p>
136 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
137 <h3 class="title">Note</h3>
138 <p>
139               This option is mainly of interest to BIND 9 developers
140               and may be removed or changed in a future release.
141             </p>
142 </div>
143 </dd>
144 <dt><span class="term">-S <em class="replaceable"><code>#max-socks</code></em></span></dt>
145 <dd>
146 <p>
147             Allow <span class="command"><strong>named</strong></span> to use up to
148             <em class="replaceable"><code>#max-socks</code></em> sockets.
149           </p>
150 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
151 <h3 class="title">Warning</h3>
152 <p>
153               This option should be unnecessary for the vast majority
154               of users.
155               The use of this option could even be harmful because the
156               specified value may exceed the limitation of the
157               underlying system API.
158               It is therefore set only when the default configuration
159               causes exhaustion of file descriptors and the
160               operational environment is known to support the
161               specified number of sockets.
162               Note also that the actual maximum number is normally a little
163               fewer than the specified value because
164               <span class="command"><strong>named</strong></span> reserves some file descriptors
165               for its internal use.
166             </p>
167 </div>
168 </dd>
169 <dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
170 <dd>
171 <p>Chroot
172             to <em class="replaceable"><code>directory</code></em> after
173             processing the command line arguments, but before
174             reading the configuration file.
175           </p>
176 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
177 <h3 class="title">Warning</h3>
178 <p>
179               This option should be used in conjunction with the
180               <code class="option">-u</code> option, as chrooting a process
181               running as root doesn't enhance security on most
182               systems; the way <code class="function">chroot(2)</code> is
183               defined allows a process with root privileges to
184               escape a chroot jail.
185             </p>
186 </div>
187 </dd>
188 <dt><span class="term">-U <em class="replaceable"><code>#listeners</code></em></span></dt>
189 <dd><p>
190             Use <em class="replaceable"><code>#listeners</code></em>
191             worker threads to listen for incoming UDP packets on each
192             address.  If not specified, <span class="command"><strong>named</strong></span> will
193             calculate a default value based on the number of detected
194             CPUs: 1 for 1 CPU, and the number of detected CPUs
195             minus one for machines with more than 1 CPU. This cannot
196             be increased to a value higher than the number of CPUs.
197             If <code class="option">-n</code> has been set to a higher value than
198             the number of detected CPUs, then <code class="option">-U</code> may
199             be increased as high as that value, but no higher.
200             On Windows, the number of UDP listeners is hardwired to 1
201             and this option has no effect.
202           </p></dd>
203 <dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
204 <dd>
205 <p>Setuid
206             to <em class="replaceable"><code>user</code></em> after completing
207             privileged operations, such as creating sockets that
208             listen on privileged ports.
209           </p>
210 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
211 <h3 class="title">Note</h3>
212 <p>
213               On Linux, <span class="command"><strong>named</strong></span> uses the kernel's
214                         capability mechanism to drop all root privileges
215               except the ability to <code class="function">bind(2)</code> to
216               a
217               privileged port and set process resource limits.
218               Unfortunately, this means that the <code class="option">-u</code>
219               option only works when <span class="command"><strong>named</strong></span> is
220               run
221               on kernel 2.2.18 or later, or kernel 2.3.99-pre3 or
222               later, since previous kernels did not allow privileges
223               to be retained after <code class="function">setuid(2)</code>.
224             </p>
225 </div>
226 </dd>
227 <dt><span class="term">-v</span></dt>
228 <dd><p>
229             Report the version number and exit.
230           </p></dd>
231 <dt><span class="term">-V</span></dt>
232 <dd><p>
233             Report the version number and build options, and exit.
234           </p></dd>
235 <dt><span class="term">-x <em class="replaceable"><code>cache-file</code></em></span></dt>
236 <dd>
237 <p>
238             Load data from <em class="replaceable"><code>cache-file</code></em> into the
239             cache of the default view.
240           </p>
241 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
242 <h3 class="title">Warning</h3>
243 <p>
244               This option must not be used.  It is only of interest
245               to BIND 9 developers and may be removed or changed in a
246               future release.
247             </p>
248 </div>
249 </dd>
250 </dl></div>
251 </div>
252 <div class="refsection">
253 <a name="id-1.9"></a><h2>SIGNALS</h2>
254 <p>
255       In routine operation, signals should not be used to control
256       the nameserver; <span class="command"><strong>rndc</strong></span> should be used
257       instead.
258     </p>
259 <div class="variablelist"><dl class="variablelist">
260 <dt><span class="term">SIGHUP</span></dt>
261 <dd><p>
262             Force a reload of the server.
263           </p></dd>
264 <dt><span class="term">SIGINT, SIGTERM</span></dt>
265 <dd><p>
266             Shut down the server.
267           </p></dd>
268 </dl></div>
269 <p>
270       The result of sending any other signals to the server is undefined.
271     </p>
272 </div>
273 <div class="refsection">
274 <a name="id-1.10"></a><h2>CONFIGURATION</h2>
275 <p>
276       The <span class="command"><strong>named</strong></span> configuration file is too complex
277       to describe in detail here.  A complete description is provided
278       in the
279       <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
280     </p>
281 <p>
282       <span class="command"><strong>named</strong></span> inherits the <code class="function">umask</code>
283       (file creation mode mask) from the parent process. If files
284       created by <span class="command"><strong>named</strong></span>, such as journal files,
285       need to have custom permissions, the <code class="function">umask</code>
286       should be set explicitly in the script used to start the
287       <span class="command"><strong>named</strong></span> process.
288     </p>
289 </div>
290 <div class="refsection">
291 <a name="id-1.11"></a><h2>FILES</h2>
292 <div class="variablelist"><dl class="variablelist">
293 <dt><span class="term"><code class="filename">/etc/named.conf</code></span></dt>
294 <dd><p>
295             The default configuration file.
296           </p></dd>
297 <dt><span class="term"><code class="filename">/var/run/named/named.pid</code></span></dt>
298 <dd><p>
299             The default process-id file.
300           </p></dd>
301 </dl></div>
302 </div>
303 <div class="refsection">
304 <a name="id-1.12"></a><h2>SEE ALSO</h2>
305 <p><em class="citetitle">RFC 1033</em>,
306       <em class="citetitle">RFC 1034</em>,
307       <em class="citetitle">RFC 1035</em>,
308       <span class="citerefentry"><span class="refentrytitle">named-checkconf</span>(8)</span>,
309       <span class="citerefentry"><span class="refentrytitle">named-checkzone</span>(8)</span>,
310       <span class="citerefentry"><span class="refentrytitle">rndc</span>(8)</span>,
311       <span class="citerefentry"><span class="refentrytitle">lwresd</span>(8)</span>,
312       <span class="citerefentry"><span class="refentrytitle">named.conf</span>(5)</span>,
313       <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
314     </p>
315 </div>
316 </div></body>
317 </html>