Detect FPU by checking CPUID features.
[dragonfly.git] / contrib / bind-9.5.2 / bin / nsupdate / nsupdate.html
blob522b20fa19d513cec1590548aa25d200236eb735
1 <!--
2 - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-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 <!-- $Id: nsupdate.html,v 1.37.56.3 2009/07/11 01:43:29 tbox Exp $ -->
18 <html>
19 <head>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>nsupdate</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23 </head>
24 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
25 <a name="id2476275"></a><div class="titlepage"></div>
26 <div class="refnamediv">
27 <h2>Name</h2>
28 <p>nsupdate &#8212; Dynamic DNS update utility</p>
29 </div>
30 <div class="refsynopsisdiv">
31 <h2>Synopsis</h2>
32 <div class="cmdsynopsis"><p><code class="command">nsupdate</code> [<code class="option">-d</code>] [[<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></code>] | [<code class="option">-k <em class="replaceable"><code>keyfile</code></em></code>]] [<code class="option">-t <em class="replaceable"><code>timeout</code></em></code>] [<code class="option">-u <em class="replaceable"><code>udptimeout</code></em></code>] [<code class="option">-r <em class="replaceable"><code>udpretries</code></em></code>] [<code class="option">-R <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-v</code>] [filename]</p></div>
33 </div>
34 <div class="refsect1" lang="en">
35 <a name="id2543432"></a><h2>DESCRIPTION</h2>
36 <p><span><strong class="command">nsupdate</strong></span>
37 is used to submit Dynamic DNS Update requests as defined in RFC2136
38 to a name server.
39 This allows resource records to be added or removed from a zone
40 without manually editing the zone file.
41 A single update request can contain requests to add or remove more than
42 one
43 resource record.
44 </p>
45 <p>
46 Zones that are under dynamic control via
47 <span><strong class="command">nsupdate</strong></span>
48 or a DHCP server should not be edited by hand.
49 Manual edits could
50 conflict with dynamic updates and cause data to be lost.
51 </p>
52 <p>
53 The resource records that are dynamically added or removed with
54 <span><strong class="command">nsupdate</strong></span>
55 have to be in the same zone.
56 Requests are sent to the zone's master server.
57 This is identified by the MNAME field of the zone's SOA record.
58 </p>
59 <p>
60 The
61 <code class="option">-d</code>
62 option makes
63 <span><strong class="command">nsupdate</strong></span>
64 operate in debug mode.
65 This provides tracing information about the update requests that are
66 made and the replies received from the name server.
67 </p>
68 <p>
69 Transaction signatures can be used to authenticate the Dynamic DNS
70 updates.
71 These use the TSIG resource record type described in RFC2845 or the
72 SIG(0) record described in RFC3535 and RFC2931.
73 TSIG relies on a shared secret that should only be known to
74 <span><strong class="command">nsupdate</strong></span> and the name server.
75 Currently, the only supported encryption algorithm for TSIG is
76 HMAC-MD5, which is defined in RFC 2104.
77 Once other algorithms are defined for TSIG, applications will need to
78 ensure they select the appropriate algorithm as well as the key when
79 authenticating each other.
80 For instance, suitable
81 <span class="type">key</span>
82 and
83 <span class="type">server</span>
84 statements would be added to
85 <code class="filename">/etc/named.conf</code>
86 so that the name server can associate the appropriate secret key
87 and algorithm with the IP address of the
88 client application that will be using TSIG authentication.
89 SIG(0) uses public key cryptography. To use a SIG(0) key, the public
90 key must be stored in a KEY record in a zone served by the name server.
91 <span><strong class="command">nsupdate</strong></span>
92 does not read
93 <code class="filename">/etc/named.conf</code>.
94 </p>
95 <p><span><strong class="command">nsupdate</strong></span>
96 uses the <code class="option">-y</code> or <code class="option">-k</code> option
97 to provide the shared secret needed to generate a TSIG record
98 for authenticating Dynamic DNS update requests, default type
99 HMAC-MD5. These options are mutually exclusive. With the
100 <code class="option">-k</code> option, <span><strong class="command">nsupdate</strong></span> reads
101 the shared secret from the file <em class="parameter"><code>keyfile</code></em>,
102 whose name is of the form
103 <code class="filename">K{name}.+157.+{random}.private</code>. For
104 historical reasons, the file
105 <code class="filename">K{name}.+157.+{random}.key</code> must also be
106 present. When the <code class="option">-y</code> option is used, a
107 signature is generated from
108 [<span class="optional"><em class="parameter"><code>hmac:</code></em></span>]<em class="parameter"><code>keyname:secret.</code></em>
109 <em class="parameter"><code>keyname</code></em> is the name of the key, and
110 <em class="parameter"><code>secret</code></em> is the base64 encoded shared
111 secret. Use of the <code class="option">-y</code> option is discouraged
112 because the shared secret is supplied as a command line
113 argument in clear text. This may be visible in the output
114 from
115 <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span> or in a history file maintained by the user's
116 shell.
117 </p>
119 The <code class="option">-k</code> may also be used to specify a SIG(0) key used
120 to authenticate Dynamic DNS update requests. In this case, the key
121 specified is not an HMAC-MD5 key.
122 </p>
124 By default,
125 <span><strong class="command">nsupdate</strong></span>
126 uses UDP to send update requests to the name server unless they are too
127 large to fit in a UDP request in which case TCP will be used.
129 <code class="option">-v</code>
130 option makes
131 <span><strong class="command">nsupdate</strong></span>
132 use a TCP connection.
133 This may be preferable when a batch of update requests is made.
134 </p>
136 The <code class="option">-t</code> option sets the maximum time an update request
138 take before it is aborted. The default is 300 seconds. Zero can be
139 used
140 to disable the timeout.
141 </p>
143 The <code class="option">-u</code> option sets the UDP retry interval. The default
145 3 seconds. If zero, the interval will be computed from the timeout
146 interval
147 and number of UDP retries.
148 </p>
150 The <code class="option">-r</code> option sets the number of UDP retries. The
151 default is
152 3. If zero, only one update request will be made.
153 </p>
155 The <code class="option">-R <em class="replaceable"><code>randomdev</code></em></code> option
156 specifies a source of randomness. If the operating system
157 does not provide a <code class="filename">/dev/random</code> or
158 equivalent device, the default source of randomness is keyboard
159 input. <code class="filename">randomdev</code> specifies the name of
160 a character device or file containing random data to be used
161 instead of the default. The special value
162 <code class="filename">keyboard</code> indicates that keyboard input
163 should be used. This option may be specified multiple times.
164 </p>
165 </div>
166 <div class="refsect1" lang="en">
167 <a name="id2543681"></a><h2>INPUT FORMAT</h2>
168 <p><span><strong class="command">nsupdate</strong></span>
169 reads input from
170 <em class="parameter"><code>filename</code></em>
171 or standard input.
172 Each command is supplied on exactly one line of input.
173 Some commands are for administrative purposes.
174 The others are either update instructions or prerequisite checks on the
175 contents of the zone.
176 These checks set conditions that some name or set of
177 resource records (RRset) either exists or is absent from the zone.
178 These conditions must be met if the entire update request is to succeed.
179 Updates will be rejected if the tests for the prerequisite conditions
180 fail.
181 </p>
183 Every update request consists of zero or more prerequisites
184 and zero or more updates.
185 This allows a suitably authenticated update request to proceed if some
186 specified resource records are present or missing from the zone.
187 A blank input line (or the <span><strong class="command">send</strong></span> command)
188 causes the
189 accumulated commands to be sent as one Dynamic DNS update request to the
190 name server.
191 </p>
193 The command formats and their meaning are as follows:
194 </p>
195 <div class="variablelist"><dl>
196 <dt><span class="term">
197 <span><strong class="command">server</strong></span>
198 {servername}
199 [port]
200 </span></dt>
201 <dd><p>
202 Sends all dynamic update requests to the name server
203 <em class="parameter"><code>servername</code></em>.
204 When no server statement is provided,
205 <span><strong class="command">nsupdate</strong></span>
206 will send updates to the master server of the correct zone.
207 The MNAME field of that zone's SOA record will identify the
208 master
209 server for that zone.
210 <em class="parameter"><code>port</code></em>
211 is the port number on
212 <em class="parameter"><code>servername</code></em>
213 where the dynamic update requests get sent.
214 If no port number is specified, the default DNS port number of
215 53 is
216 used.
217 </p></dd>
218 <dt><span class="term">
219 <span><strong class="command">local</strong></span>
220 {address}
221 [port]
222 </span></dt>
223 <dd><p>
224 Sends all dynamic update requests using the local
225 <em class="parameter"><code>address</code></em>.
227 When no local statement is provided,
228 <span><strong class="command">nsupdate</strong></span>
229 will send updates using an address and port chosen by the
230 system.
231 <em class="parameter"><code>port</code></em>
232 can additionally be used to make requests come from a specific
233 port.
234 If no port number is specified, the system will assign one.
235 </p></dd>
236 <dt><span class="term">
237 <span><strong class="command">zone</strong></span>
238 {zonename}
239 </span></dt>
240 <dd><p>
241 Specifies that all updates are to be made to the zone
242 <em class="parameter"><code>zonename</code></em>.
243 If no
244 <em class="parameter"><code>zone</code></em>
245 statement is provided,
246 <span><strong class="command">nsupdate</strong></span>
247 will attempt determine the correct zone to update based on the
248 rest of the input.
249 </p></dd>
250 <dt><span class="term">
251 <span><strong class="command">class</strong></span>
252 {classname}
253 </span></dt>
254 <dd><p>
255 Specify the default class.
256 If no <em class="parameter"><code>class</code></em> is specified, the
257 default class is
258 <em class="parameter"><code>IN</code></em>.
259 </p></dd>
260 <dt><span class="term">
261 <span><strong class="command">key</strong></span>
262 {name}
263 {secret}
264 </span></dt>
265 <dd><p>
266 Specifies that all updates are to be TSIG-signed using the
267 <em class="parameter"><code>keyname</code></em> <em class="parameter"><code>keysecret</code></em> pair.
268 The <span><strong class="command">key</strong></span> command
269 overrides any key specified on the command line via
270 <code class="option">-y</code> or <code class="option">-k</code>.
271 </p></dd>
272 <dt><span class="term">
273 <span><strong class="command">prereq nxdomain</strong></span>
274 {domain-name}
275 </span></dt>
276 <dd><p>
277 Requires that no resource record of any type exists with name
278 <em class="parameter"><code>domain-name</code></em>.
279 </p></dd>
280 <dt><span class="term">
281 <span><strong class="command">prereq yxdomain</strong></span>
282 {domain-name}
283 </span></dt>
284 <dd><p>
285 Requires that
286 <em class="parameter"><code>domain-name</code></em>
287 exists (has as at least one resource record, of any type).
288 </p></dd>
289 <dt><span class="term">
290 <span><strong class="command">prereq nxrrset</strong></span>
291 {domain-name}
292 [class]
293 {type}
294 </span></dt>
295 <dd><p>
296 Requires that no resource record exists of the specified
297 <em class="parameter"><code>type</code></em>,
298 <em class="parameter"><code>class</code></em>
300 <em class="parameter"><code>domain-name</code></em>.
302 <em class="parameter"><code>class</code></em>
303 is omitted, IN (internet) is assumed.
304 </p></dd>
305 <dt><span class="term">
306 <span><strong class="command">prereq yxrrset</strong></span>
307 {domain-name}
308 [class]
309 {type}
310 </span></dt>
311 <dd><p>
312 This requires that a resource record of the specified
313 <em class="parameter"><code>type</code></em>,
314 <em class="parameter"><code>class</code></em>
316 <em class="parameter"><code>domain-name</code></em>
317 must exist.
319 <em class="parameter"><code>class</code></em>
320 is omitted, IN (internet) is assumed.
321 </p></dd>
322 <dt><span class="term">
323 <span><strong class="command">prereq yxrrset</strong></span>
324 {domain-name}
325 [class]
326 {type}
327 {data...}
328 </span></dt>
329 <dd><p>
331 <em class="parameter"><code>data</code></em>
332 from each set of prerequisites of this form
333 sharing a common
334 <em class="parameter"><code>type</code></em>,
335 <em class="parameter"><code>class</code></em>,
337 <em class="parameter"><code>domain-name</code></em>
338 are combined to form a set of RRs. This set of RRs must
339 exactly match the set of RRs existing in the zone at the
340 given
341 <em class="parameter"><code>type</code></em>,
342 <em class="parameter"><code>class</code></em>,
344 <em class="parameter"><code>domain-name</code></em>.
346 <em class="parameter"><code>data</code></em>
347 are written in the standard text representation of the resource
348 record's
349 RDATA.
350 </p></dd>
351 <dt><span class="term">
352 <span><strong class="command">update delete</strong></span>
353 {domain-name}
354 [ttl]
355 [class]
356 [type [data...]]
357 </span></dt>
358 <dd><p>
359 Deletes any resource records named
360 <em class="parameter"><code>domain-name</code></em>.
362 <em class="parameter"><code>type</code></em>
364 <em class="parameter"><code>data</code></em>
365 is provided, only matching resource records will be removed.
366 The internet class is assumed if
367 <em class="parameter"><code>class</code></em>
368 is not supplied. The
369 <em class="parameter"><code>ttl</code></em>
370 is ignored, and is only allowed for compatibility.
371 </p></dd>
372 <dt><span class="term">
373 <span><strong class="command">update add</strong></span>
374 {domain-name}
375 {ttl}
376 [class]
377 {type}
378 {data...}
379 </span></dt>
380 <dd><p>
381 Adds a new resource record with the specified
382 <em class="parameter"><code>ttl</code></em>,
383 <em class="parameter"><code>class</code></em>
385 <em class="parameter"><code>data</code></em>.
386 </p></dd>
387 <dt><span class="term">
388 <span><strong class="command">show</strong></span>
389 </span></dt>
390 <dd><p>
391 Displays the current message, containing all of the
392 prerequisites and
393 updates specified since the last send.
394 </p></dd>
395 <dt><span class="term">
396 <span><strong class="command">send</strong></span>
397 </span></dt>
398 <dd><p>
399 Sends the current message. This is equivalent to entering a
400 blank line.
401 </p></dd>
402 <dt><span class="term">
403 <span><strong class="command">answer</strong></span>
404 </span></dt>
405 <dd><p>
406 Displays the answer.
407 </p></dd>
408 </dl></div>
410 </p>
412 Lines beginning with a semicolon are comments and are ignored.
413 </p>
414 </div>
415 <div class="refsect1" lang="en">
416 <a name="id2544478"></a><h2>EXAMPLES</h2>
418 The examples below show how
419 <span><strong class="command">nsupdate</strong></span>
420 could be used to insert and delete resource records from the
421 <span class="type">example.com</span>
422 zone.
423 Notice that the input in each example contains a trailing blank line so
424 that
425 a group of commands are sent as one dynamic update request to the
426 master name server for
427 <span class="type">example.com</span>.
429 </p>
430 <pre class="programlisting">
431 # nsupdate
432 &gt; update delete oldhost.example.com A
433 &gt; update add newhost.example.com 86400 A 172.16.1.1
434 &gt; send
435 </pre>
437 </p>
439 Any A records for
440 <span class="type">oldhost.example.com</span>
441 are deleted.
442 And an A record for
443 <span class="type">newhost.example.com</span>
444 with IP address 172.16.1.1 is added.
445 The newly-added record has a 1 day TTL (86400 seconds).
446 </p>
447 <pre class="programlisting">
448 # nsupdate
449 &gt; prereq nxdomain nickname.example.com
450 &gt; update add nickname.example.com 86400 CNAME somehost.example.com
451 &gt; send
452 </pre>
454 </p>
456 The prerequisite condition gets the name server to check that there
457 are no resource records of any type for
458 <span class="type">nickname.example.com</span>.
460 If there are, the update request fails.
461 If this name does not exist, a CNAME for it is added.
462 This ensures that when the CNAME is added, it cannot conflict with the
463 long-standing rule in RFC1034 that a name must not exist as any other
464 record type if it exists as a CNAME.
465 (The rule has been updated for DNSSEC in RFC2535 to allow CNAMEs to have
466 RRSIG, DNSKEY and NSEC records.)
467 </p>
468 </div>
469 <div class="refsect1" lang="en">
470 <a name="id2544522"></a><h2>FILES</h2>
471 <div class="variablelist"><dl>
472 <dt><span class="term"><code class="constant">/etc/resolv.conf</code></span></dt>
473 <dd><p>
474 used to identify default name server
475 </p></dd>
476 <dt><span class="term"><code class="constant">K{name}.+157.+{random}.key</code></span></dt>
477 <dd><p>
478 base-64 encoding of HMAC-MD5 key created by
479 <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
480 </p></dd>
481 <dt><span class="term"><code class="constant">K{name}.+157.+{random}.private</code></span></dt>
482 <dd><p>
483 base-64 encoding of HMAC-MD5 key created by
484 <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
485 </p></dd>
486 </dl></div>
487 </div>
488 <div class="refsect1" lang="en">
489 <a name="id2542134"></a><h2>SEE ALSO</h2>
490 <p><span class="citerefentry"><span class="refentrytitle">RFC2136</span></span>,
491 <span class="citerefentry"><span class="refentrytitle">RFC3007</span></span>,
492 <span class="citerefentry"><span class="refentrytitle">RFC2104</span></span>,
493 <span class="citerefentry"><span class="refentrytitle">RFC2845</span></span>,
494 <span class="citerefentry"><span class="refentrytitle">RFC1034</span></span>,
495 <span class="citerefentry"><span class="refentrytitle">RFC2535</span></span>,
496 <span class="citerefentry"><span class="refentrytitle">RFC2931</span></span>,
497 <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
498 <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
499 </p>
500 </div>
501 <div class="refsect1" lang="en">
502 <a name="id2544867"></a><h2>BUGS</h2>
504 The TSIG key is redundantly stored in two separate files.
505 This is a consequence of nsupdate using the DST library
506 for its cryptographic operations, and may change in future
507 releases.
508 </p>
509 </div>
510 </div></body>
511 </html>