man.nsupdate.html revision 2cc6eb92f9443695bc32fa6eed372d983d261a35
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<!--
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - Copyright (C) 2000-2003 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews -
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - purpose with or without fee is hereby granted, provided that the above
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson -
adbc1771946365942cc149f6130c36f3aca44fb8Automatic Updater - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson - PERFORMANCE OF THIS SOFTWARE.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson-->
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<!-- $Id: man.nsupdate.html,v 1.26 2009/01/09 01:11:52 tbox Exp $ -->
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrews<html>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<head>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<title>nsupdate</title>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<link rel="up" href="Bv9ARM.ch10.html" title="Manual pages">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<link rel="prev" href="man.named.html" title="named">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<link rel="next" href="man.rndc.html" title="rndc">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</head>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="navheader">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<table width="100%" summary="Navigation header">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<tr><th colspan="3" align="center"><span class="application">nsupdate</span></th></tr>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<tr>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<td width="20%" align="left">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<a accesskey="p" href="man.named.html">Prev</a>�</td>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<th width="60%" align="center">Manual pages</th>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<td width="20%" align="right">�<a accesskey="n" href="man.rndc.html">Next</a>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</td>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</tr>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</table>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<hr>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</div>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="refentry" lang="en">
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt<a name="man.nsupdate"></a><div class="titlepage"></div>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="refnamediv">
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<h2>Name</h2>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p><span class="application">nsupdate</span> &#8212; Dynamic DNS update utility</p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</div>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="refsynopsisdiv">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<h2>Synopsis</h2>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="cmdsynopsis"><p><code class="command">nsupdate</code> [<code class="option">-d</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>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</div>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<div class="refsect1" lang="en">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<a name="id2610359"></a><h2>DESCRIPTION</h2>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p><span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson is used to submit Dynamic DNS Update requests as defined in RFC2136
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence to a name server.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt This allows resource records to be added or removed from a zone
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson without manually editing the zone file.
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence A single update request can contain requests to add or remove more than
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson one
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 resource record.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt </p>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt<p>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt Zones that are under dynamic control via
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt <span><strong class="command">nsupdate</strong></span>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt or a DHCP server should not be edited by hand.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt Manual edits could
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 conflict with dynamic updates and cause data to be lost.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 </p>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The resource records that are dynamically added or removed with
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt <span><strong class="command">nsupdate</strong></span>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt have to be in the same zone.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt Requests are sent to the zone's master server.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt This is identified by the MNAME field of the zone's SOA record.
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt </p>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt<p>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt The
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt <code class="option">-d</code>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt option makes
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt <span><strong class="command">nsupdate</strong></span>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt operate in debug mode.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson This provides tracing information about the update requests that are
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson made and the replies received from the name server.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
70c7f4fb4fc589b04a68d67479d34eecd99c1991Evan Hunt<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The <code class="option">-D</code> option makes <span><strong class="command">nsupdate</strong></span>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein report additional debugging information to <code class="option">-d</code>.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Transaction signatures can be used to authenticate the Dynamic DNS
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 updates.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 These use the TSIG resource record type described in RFC2845 or the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein SIG(0) record described in RFC3535 and RFC2931.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson TSIG relies on a shared secret that should only be known to
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">nsupdate</strong></span> and the name server.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Currently, the only supported encryption algorithm for TSIG is
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein HMAC-MD5, which is defined in RFC 2104.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Once other algorithms are defined for TSIG, applications will need to
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson ensure they select the appropriate algorithm as well as the key when
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson authenticating each other.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein For instance, suitable
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span class="type">key</span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson and
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span class="type">server</span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson statements would be added to
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <code class="filename">/etc/named.conf</code>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein so that the name server can associate the appropriate secret key
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson and algorithm with the IP address of the
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson client application that will be using TSIG authentication.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson SIG(0) uses public key cryptography. To use a SIG(0) key, the public
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson key must be stored in a KEY record in a zone served by the name server.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson does not read
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <code class="filename">/etc/named.conf</code>.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p><span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson uses the <code class="option">-y</code> or <code class="option">-k</code> option
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein to provide the shared secret needed to generate a TSIG record
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson for authenticating Dynamic DNS update requests, default type
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson HMAC-MD5. These options are mutually exclusive. With the
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <code class="option">-k</code> option, <span><strong class="command">nsupdate</strong></span> reads
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson the shared secret from the file <em class="parameter"><code>keyfile</code></em>,
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein whose name is of the form
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <code class="filename">K{name}.+157.+{random}.private</code>. For
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson historical reasons, the file
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <code class="filename">K{name}.+157.+{random}.key</code> must also be
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson present. When the <code class="option">-y</code> option is used, a
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein signature is generated from
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson [<span class="optional"><em class="parameter"><code>hmac:</code></em></span>]<em class="parameter"><code>keyname:secret.</code></em>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <em class="parameter"><code>keyname</code></em> is the name of the key, and
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <em class="parameter"><code>secret</code></em> is the base64 encoded shared
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein secret. Use of the <code class="option">-y</code> option is discouraged
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson because the shared secret is supplied as a command line
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein argument in clear text. This may be visible in the output
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein from
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span> or in a history file maintained by the user's
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson shell.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
97404c1965ae83ecbfe9cf7b06f67dce5e28c588Andreas Gustafsson<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-k</code> may also be used to specify a SIG(0) key used
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson to authenticate Dynamic DNS update requests. In this case, the key
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson specified is not an HMAC-MD5 key.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein By default
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson uses UDP to send update requests to the name server unless they are too
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence large to fit in a UDP request in which case TCP will be used.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence <code class="option">-v</code>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson option makes
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson use a TCP connection.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson This may be preferable when a batch of update requests is made.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-t</code> option sets the maximum time an update request
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson can
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson take before it is aborted. The default is 300 seconds. Zero can be
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson used
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein to disable the timeout.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The <code class="option">-u</code> option sets the UDP retry interval. The default
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafsson is
4e1d3e67cdc76609bad5f0310ac48de10b442b9fMark Andrews 3 seconds. If zero, the interval will be computed from the timeout
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein interval
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson and number of UDP retries.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The <code class="option">-r</code> option sets the number of UDP retries. The
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson default is
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson 3. If zero, only one update request will be made.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <code class="option">-R <em class="replaceable"><code>randomdev</code></em></code> option
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson specifies a source of randomness. If the operating system
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson does not provide a <code class="filename">/dev/random</code> or
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafsson equivalent device, the default source of randomness is keyboard
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson input. <code class="filename">randomdev</code> specifies the name of
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein a character device or file containing random data to be used
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson instead of the default. The special value
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <code class="filename">keyboard</code> indicates that keyboard input
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson should be used. This option may be specified multiple times.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson</div>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="refsect1" lang="en">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<a name="id2610944"></a><h2>INPUT FORMAT</h2>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p><span><strong class="command">nsupdate</strong></span>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence reads input from
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <em class="parameter"><code>filename</code></em>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson or standard input.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Each command is supplied on exactly one line of input.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Some commands are for administrative purposes.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The others are either update instructions or prerequisite checks on the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein contents of the zone.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein These checks set conditions that some name or set of
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson resource records (RRset) either exists or is absent from the zone.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson These conditions must be met if the entire update request is to succeed.
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafsson Updates will be rejected if the tests for the prerequisite conditions
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson fail.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Every update request consists of zero or more prerequisites
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson and zero or more updates.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson This allows a suitably authenticated update request to proceed if some
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson specified resource records are present or missing from the zone.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein A blank input line (or the <span><strong class="command">send</strong></span> command)
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson causes the
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson accumulated commands to be sent as one Dynamic DNS update request to the
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson name server.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence<p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson The command formats and their meaning are as follows:
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<div class="variablelist"><dl>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dt><span class="term">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">server</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson {servername}
9b0e18da3d5c2290f90b285d122d368173f17c63Andreas Gustafsson [port]
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson </span></dt>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein<dd><p>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson Sends all dynamic update requests to the name server
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <em class="parameter"><code>servername</code></em>.
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson When no server statement is provided,
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">nsupdate</strong></span>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson will send updates to the master server of the correct zone.
8f79820c6930ee5ef6b4a54f36d2559400bdf47dAndreas Gustafsson The MNAME field of that zone's SOA record will identify the
8f79820c6930ee5ef6b4a54f36d2559400bdf47dAndreas Gustafsson master
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein server for that zone.
8f79820c6930ee5ef6b4a54f36d2559400bdf47dAndreas Gustafsson <em class="parameter"><code>port</code></em>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence is the port number on
8f79820c6930ee5ef6b4a54f36d2559400bdf47dAndreas Gustafsson <em class="parameter"><code>servername</code></em>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 where the dynamic update requests get sent.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 If no port number is specified, the default DNS port number of
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 53 is
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 used.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 </p></dd>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉<dt><span class="term">
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 <span><strong class="command">local</strong></span>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 {address}
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 [port]
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 </span></dt>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉<dd><p>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 Sends all dynamic update requests using the local
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews <em class="parameter"><code>address</code></em>.
2a184ff86544cc67c36e2ce6bb3ddb5ac44684b8Evan Hunt
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein When no local statement is provided,
50a3152b7088546418c8edc0c89eeaf48560b035Andreas Gustafsson <span><strong class="command">nsupdate</strong></span>
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews will send updates using an address and port chosen by the
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews system.
2a184ff86544cc67c36e2ce6bb3ddb5ac44684b8Evan Hunt <em class="parameter"><code>port</code></em>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 can additionally be used to make requests come from a specific
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 port.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 If no port number is specified, the system will assign one.
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉 </p></dd>
7781f25078c491a9650dec555bdc86cb0ed49861Tatuya JINMEI 神明達哉<dt><span class="term">
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington <span><strong class="command">zone</strong></span>
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington {zonename}
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein </span></dt>
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington<dd><p>
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Specifies that all updates are to be made to the zone
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington <em class="parameter"><code>zonename</code></em>.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein If no
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>zone</code></em>
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington statement is provided,
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington <span><strong class="command">nsupdate</strong></span>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt will attempt determine the correct zone to update based on the
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt rest of the input.
adbc1771946365942cc149f6130c36f3aca44fb8Automatic Updater </p></dd>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt<dt><span class="term">
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt <span><strong class="command">class</strong></span>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt {classname}
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt </span></dt>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt<dd><p>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt Specify the default class.
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt If no <em class="parameter"><code>class</code></em> is specified, the
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt default class is
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt <em class="parameter"><code>IN</code></em>.
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt </p></dd>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt<dt><span class="term">
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt <span><strong class="command">ttl</strong></span>
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt {seconds}
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt </span></dt>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews<dd><p>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews Specify the default time to live for records to be added.
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews The value <em class="parameter"><code>none</code></em> will clear the default
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt ttl.
01279934803dd45c007a58b61fe20c2852135b52Evan Hunt </p></dd>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews<dt><span class="term">
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews <span><strong class="command">key</strong></span>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein {name}
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein {secret}
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews </span></dt>
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews<dd><p>
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein Specifies that all updates are to be TSIG-signed using the
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein <em class="parameter"><code>keyname</code></em> <em class="parameter"><code>keysecret</code></em> pair.
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein The <span><strong class="command">key</strong></span> command
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews overrides any key specified on the command line via
6c8abf481df85a67c3f32f5f107b554d3ff5a3edMark Andrews <code class="option">-y</code> or <code class="option">-k</code>.
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt </p></dd>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<dt><span class="term">
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt <span><strong class="command">prereq nxdomain</strong></span>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt {domain-name}
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt </span></dt>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<dd><p>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt Requires that no resource record of any type exists with name
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt <em class="parameter"><code>domain-name</code></em>.
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt </p></dd>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<dt><span class="term">
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt <span><strong class="command">prereq yxdomain</strong></span>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt {domain-name}
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt </span></dt>
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt<dd><p>
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt Requires that
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt <em class="parameter"><code>domain-name</code></em>
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt exists (has as at least one resource record, of any type).
d640b4a0ab9dec252749793f78a1ed1e8551ea19Evan Hunt </p></dd>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<dt><span class="term">
bbf31e6b623af575138669bdd7031232867b9166Mark Andrews <span><strong class="command">prereq nxrrset</strong></span>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt {domain-name}
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt [class]
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt {type}
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt </span></dt>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt<dd><p>
dd2a0a6d2dec1c23787351e51b434a838dec5603Evan Hunt Requires that no resource record exists of the specified
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt <em class="parameter"><code>type</code></em>,
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt <em class="parameter"><code>class</code></em>
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt and
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt <em class="parameter"><code>domain-name</code></em>.
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt If
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt <em class="parameter"><code>class</code></em>
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt is omitted, IN (internet) is assumed.
feb067b25a8e33db62e2a7bf2e83bbb7f6eee845Evan Hunt </p></dd>
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson<dt><span class="term">
f951f076f3d321c52b824a866caff28ce4f8e06cAndreas Gustafsson <span><strong class="command">prereq yxrrset</strong></span>
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence {domain-name}
[class]
{type}
</span></dt>
<dd><p>
This requires that a resource record of the specified
<em class="parameter"><code>type</code></em>,
<em class="parameter"><code>class</code></em>
and
<em class="parameter"><code>domain-name</code></em>
must exist.
If
<em class="parameter"><code>class</code></em>
is omitted, IN (internet) is assumed.
</p></dd>
<dt><span class="term">
<span><strong class="command">prereq yxrrset</strong></span>
{domain-name}
[class]
{type}
{data...}
</span></dt>
<dd><p>
The
<em class="parameter"><code>data</code></em>
from each set of prerequisites of this form
sharing a common
<em class="parameter"><code>type</code></em>,
<em class="parameter"><code>class</code></em>,
and
<em class="parameter"><code>domain-name</code></em>
are combined to form a set of RRs. This set of RRs must
exactly match the set of RRs existing in the zone at the
given
<em class="parameter"><code>type</code></em>,
<em class="parameter"><code>class</code></em>,
and
<em class="parameter"><code>domain-name</code></em>.
The
<em class="parameter"><code>data</code></em>
are written in the standard text representation of the resource
record's
RDATA.
</p></dd>
<dt><span class="term">
<span><strong class="command">update delete</strong></span>
{domain-name}
[ttl]
[class]
[type [data...]]
</span></dt>
<dd><p>
Deletes any resource records named
<em class="parameter"><code>domain-name</code></em>.
If
<em class="parameter"><code>type</code></em>
and
<em class="parameter"><code>data</code></em>
is provided, only matching resource records will be removed.
The internet class is assumed if
<em class="parameter"><code>class</code></em>
is not supplied. The
<em class="parameter"><code>ttl</code></em>
is ignored, and is only allowed for compatibility.
</p></dd>
<dt><span class="term">
<span><strong class="command">update add</strong></span>
{domain-name}
{ttl}
[class]
{type}
{data...}
</span></dt>
<dd><p>
Adds a new resource record with the specified
<em class="parameter"><code>ttl</code></em>,
<em class="parameter"><code>class</code></em>
and
<em class="parameter"><code>data</code></em>.
</p></dd>
<dt><span class="term">
<span><strong class="command">show</strong></span>
</span></dt>
<dd><p>
Displays the current message, containing all of the
prerequisites and
updates specified since the last send.
</p></dd>
<dt><span class="term">
<span><strong class="command">send</strong></span>
</span></dt>
<dd><p>
Sends the current message. This is equivalent to entering a
blank line.
</p></dd>
<dt><span class="term">
<span><strong class="command">answer</strong></span>
</span></dt>
<dd><p>
Displays the answer.
</p></dd>
<dt><span class="term">
<span><strong class="command">debug</strong></span>
</span></dt>
<dd><p>
Turn on debugging.
</p></dd>
</dl></div>
<p>
</p>
<p>
Lines beginning with a semicolon are comments and are ignored.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2659012"></a><h2>EXAMPLES</h2>
<p>
The examples below show how
<span><strong class="command">nsupdate</strong></span>
could be used to insert and delete resource records from the
<span class="type">example.com</span>
zone.
Notice that the input in each example contains a trailing blank line so
that
a group of commands are sent as one dynamic update request to the
master name server for
<span class="type">example.com</span>.
</p>
<pre class="programlisting">
# nsupdate
&gt; update delete oldhost.example.com A
&gt; update add newhost.example.com 86400 A 172.16.1.1
&gt; send
</pre>
<p>
</p>
<p>
Any A records for
<span class="type">oldhost.example.com</span>
are deleted.
And an A record for
<span class="type">newhost.example.com</span>
with IP address 172.16.1.1 is added.
The newly-added record has a 1 day TTL (86400 seconds).
</p>
<pre class="programlisting">
# nsupdate
&gt; prereq nxdomain nickname.example.com
&gt; update add nickname.example.com 86400 CNAME somehost.example.com
&gt; send
</pre>
<p>
</p>
<p>
The prerequisite condition gets the name server to check that there
are no resource records of any type for
<span class="type">nickname.example.com</span>.
If there are, the update request fails.
If this name does not exist, a CNAME for it is added.
This ensures that when the CNAME is added, it cannot conflict with the
long-standing rule in RFC1034 that a name must not exist as any other
record type if it exists as a CNAME.
(The rule has been updated for DNSSEC in RFC2535 to allow CNAMEs to have
RRSIG, DNSKEY and NSEC records.)
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2659062"></a><h2>FILES</h2>
<div class="variablelist"><dl>
<dt><span class="term"><code class="constant">/etc/resolv.conf</code></span></dt>
<dd><p>
used to identify default name server
</p></dd>
<dt><span class="term"><code class="constant">K{name}.+157.+{random}.key</code></span></dt>
<dd><p>
base-64 encoding of HMAC-MD5 key created by
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
</p></dd>
<dt><span class="term"><code class="constant">K{name}.+157.+{random}.private</code></span></dt>
<dd><p>
base-64 encoding of HMAC-MD5 key created by
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
</p></dd>
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2659131"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry"><span class="refentrytitle">RFC2136</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC3007</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC2104</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC2845</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC1034</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC2535</span></span>,
<span class="citerefentry"><span class="refentrytitle">RFC2931</span></span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2659270"></a><h2>BUGS</h2>
<p>
The TSIG key is redundantly stored in two separate files.
This is a consequence of nsupdate using the DST library
for its cryptographic operations, and may change in future
releases.
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="man.named.html">Prev</a>�</td>
<td width="20%" align="center"><a accesskey="u" href="Bv9ARM.ch10.html">Up</a></td>
<td width="40%" align="right">�<a accesskey="n" href="man.rndc.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">
<span class="application">named</span>�</td>
<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
<td width="40%" align="right" valign="top">�<span class="application">rndc</span>
</td>
</tr>
</table>
</div>
</body>
</html>