nsupdate.html revision 90c38ab4e6904126bec2f2f57f60cd834ce759cb
9fbbfb5757a1e3e86d7dea62c4e63ffc2303ca2bAutomatic Updater - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews - Copyright (C) 2000-2003 Internet Software Consortium.
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater - Permission to use, copy, modify, and/or distribute this software for any
803b50652fd6ad81d04d18fc04332c8a94f8fe9aAndreas Gustafsson - purpose with or without fee is hereby granted, provided that the above
803b50652fd6ad81d04d18fc04332c8a94f8fe9aAndreas Gustafsson - copyright notice and this permission notice appear in all copies.
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews - PERFORMANCE OF THIS SOFTWARE.
90c38ab4e6904126bec2f2f57f60cd834ce759cbAutomatic Updater<!-- $Id: nsupdate.html,v 1.49 2009/12/17 01:13:46 tbox Exp $ -->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater<a name="man.nsupdate"></a><div class="titlepage"></div>
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater<p><span class="application">nsupdate</span> — Dynamic DNS update utility</p>
163af735c2082a024167be111d27bd5b5ff4f462Automatic Updater<div class="cmdsynopsis"><p><code class="command">nsupdate</code> [<code class="option">-d</code>] [<code class="option">-D</code>] [[<code class="option">-g</code>] | [<code class="option">-o</code>] | [<code class="option">-l</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>
163af735c2082a024167be111d27bd5b5ff4f462Automatic Updater<a name="id2543453"></a><h2>DESCRIPTION</h2>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span><strong class="command">nsupdate</strong></span>
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater is used to submit Dynamic DNS Update requests as defined in RFC 2136
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to a name server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This allows resource records to be added or removed from a zone
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein without manually editing the zone file.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A single update request can contain requests to add or remove more than
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein resource record.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Zones that are under dynamic control via
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein or a DHCP server should not be edited by hand.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Manual edits could
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein conflict with dynamic updates and cause data to be lost.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The resource records that are dynamically added or removed with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein have to be in the same zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requests are sent to the zone's master server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This is identified by the MNAME field of the zone's SOA record.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option makes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein operate in debug mode.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This provides tracing information about the update requests that are
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein made and the replies received from the name server.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater The <code class="option">-D</code> option makes <span><strong class="command">nsupdate</strong></span>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater report additional debugging information to <code class="option">-d</code>.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt The <code class="option">-L</code> option with an integer argument of zero or
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt higher sets the logging debug level. If zero, logging is disabled.
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater Transaction signatures can be used to authenticate the Dynamic
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater DNS updates. These use the TSIG resource record type described
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater in RFC 2845 or the SIG(0) record described in RFC 2535 and
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater RFC 2931 or GSS-TSIG as described in RFC 3645. TSIG relies on
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater a shared secret that should only be known to
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater <span><strong class="command">nsupdate</strong></span> and the name server. Currently,
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater the only supported encryption algorithm for TSIG is HMAC-MD5,
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater which is defined in RFC 2104. Once other algorithms are
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater defined for TSIG, applications will need to ensure they select
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater the appropriate algorithm as well as the key when authenticating
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater each other. For instance, suitable <span class="type">key</span> and
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater <span class="type">server</span> statements would be added to
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater <code class="filename">/etc/named.conf</code> so that the name server
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater can associate the appropriate secret key and algorithm with
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater the IP address of the client application that will be using
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater TSIG authentication. SIG(0) uses public key cryptography.
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater To use a SIG(0) key, the public key must be stored in a KEY
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater record in a zone served by the name server.
ed4475f3f583f6137b4ff7fea775c5363a4fdb29Automatic Updater <span><strong class="command">nsupdate</strong></span> does not read
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater GSS-TSIG uses Kerberos credentials. Standard GSS-TSIG mode
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater is switched on with the <code class="option">-g</code> flag. A
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater non-standards-compliant variant of GSS-TSIG used by Windows
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater 2000 can be switched on with the <code class="option">-o</code> flag.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span><strong class="command">nsupdate</strong></span>
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews uses the <code class="option">-y</code> or <code class="option">-k</code> option
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews to provide the shared secret needed to generate a TSIG record
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews for authenticating Dynamic DNS update requests, default type
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt HMAC-MD5. These options are mutually exclusive.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt When the <code class="option">-y</code> option is used, a signature is
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt generated from
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews [<span class="optional"><em class="parameter"><code>hmac:</code></em></span>]<em class="parameter"><code>keyname:secret.</code></em>
7329012471d165cd3dc4180ad2a0a43de91e7f01Mark Andrews <em class="parameter"><code>keyname</code></em> is the name of the key, and
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <em class="parameter"><code>secret</code></em> is the base64 encoded shared secret.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt Use of the <code class="option">-y</code> option is discouraged because the
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt shared secret is supplied as a command line argument in clear text.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt This may be visible in the output from
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt or in a history file maintained by the user's shell.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <code class="option">-k</code> option, <span><strong class="command">nsupdate</strong></span> reads
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt the shared secret from the file <em class="parameter"><code>keyfile</code></em>.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt Keyfiles may be in two formats: a single file containing
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt a <code class="filename">named.conf</code>-format <span><strong class="command">key</strong></span>
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt statement, which may be generated automatically by
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <span><strong class="command">ddns-confgen</strong></span>, or a pair of files whose names are
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt of the format <code class="filename">K{name}.+157.+{random}.key</code> and
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <code class="filename">K{name}.+157.+{random}.private</code>, which can be
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt generated by <span><strong class="command">dnssec-keygen</strong></span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <code class="option">-k</code> may also be used to specify a SIG(0) key used
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to authenticate Dynamic DNS update requests. In this case, the key
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein specified is not an HMAC-MD5 key.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <span><strong class="command">nsupdate</strong></span> can be run in a local-host only mode
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt using the <code class="option">-l</code> flag. This sets the server address to
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt localhost (disabling the <span><strong class="command">server</strong></span> so that the server
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt address cannot be overridden). Connections to the local server will
90c38ab4e6904126bec2f2f57f60cd834ce759cbAutomatic Updater use a TSIG key found in <code class="filename">/var/run/named/session.key</code>,
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt which is automatically generated by <span><strong class="command">named</strong></span> if any
3cddb2c552ee6582e8db0849c28747f6b6ca57feAutomatic Updater local master zone has set <span><strong class="command">update-policy</strong></span> to
3cddb2c552ee6582e8db0849c28747f6b6ca57feAutomatic Updater <span><strong class="command">local</strong></span>. The location of this key file can be
3cddb2c552ee6582e8db0849c28747f6b6ca57feAutomatic Updater overridden with the <code class="option">-k</code> option.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt By default, <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein uses UDP to send update requests to the name server unless they are too
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein large to fit in a UDP request in which case TCP will be used.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option makes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein use a TCP connection.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This may be preferable when a batch of update requests is made.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt The <code class="option">-p</code> sets the default port number to use for
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt connections to a name server. The default is 53.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews The <code class="option">-t</code> option sets the maximum time an update request
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein take before it is aborted. The default is 300 seconds. Zero can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to disable the timeout.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <code class="option">-u</code> option sets the UDP retry interval. The default
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews 3 seconds. If zero, the interval will be computed from the timeout
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and number of UDP retries.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <code class="option">-r</code> option sets the number of UDP retries. The
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews 3. If zero, only one update request will be made.
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews The <code class="option">-R <em class="replaceable"><code>randomdev</code></em></code> option
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews specifies a source of randomness. If the operating system
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews does not provide a <code class="filename">/dev/random</code> or
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews equivalent device, the default source of randomness is keyboard
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews input. <code class="filename">randomdev</code> specifies the name of
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews a character device or file containing random data to be used
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews instead of the default. The special value
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews <code class="filename">keyboard</code> indicates that keyboard input
f02216f5b390ff0a589fa080f29350fd7794bf5cMark Andrews should be used. This option may be specified multiple times.
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater<a name="id2543785"></a><h2>INPUT FORMAT</h2>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<p><span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein reads input from
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>filename</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein or standard input.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Each command is supplied on exactly one line of input.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Some commands are for administrative purposes.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The others are either update instructions or prerequisite checks on the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein contents of the zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein These checks set conditions that some name or set of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein resource records (RRset) either exists or is absent from the zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein These conditions must be met if the entire update request is to succeed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Updates will be rejected if the tests for the prerequisite conditions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Every update request consists of zero or more prerequisites
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and zero or more updates.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This allows a suitably authenticated update request to proceed if some
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein specified resource records are present or missing from the zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A blank input line (or the <span><strong class="command">send</strong></span> command)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein accumulated commands to be sent as one Dynamic DNS update request to the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein name server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The command formats and their meaning are as follows:
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">server</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {servername}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sends all dynamic update requests to the name server
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>servername</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein When no server statement is provided,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein will send updates to the master server of the correct zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The MNAME field of that zone's SOA record will identify the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein server for that zone.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is the port number on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>servername</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein where the dynamic update requests get sent.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If no port number is specified, the default DNS port number of
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">local</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sends all dynamic update requests using the local
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>address</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein When no local statement is provided,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein will send updates using an address and port chosen by the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein can additionally be used to make requests come from a specific
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If no port number is specified, the system will assign one.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">zone</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Specifies that all updates are to be made to the zone
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>zonename</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein statement is provided,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein will attempt determine the correct zone to update based on the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein rest of the input.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">class</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Specify the default class.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews If no <em class="parameter"><code>class</code></em> is specified, the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein default class is
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater <span><strong class="command">ttl</strong></span>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater Specify the default time to live for records to be added.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater The value <em class="parameter"><code>none</code></em> will clear the default
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">key</strong></span>
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Specifies that all updates are to be TSIG-signed using the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>keyname</code></em> <em class="parameter"><code>keysecret</code></em> pair.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <span><strong class="command">key</strong></span> command
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein overrides any key specified on the command line via
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <code class="option">-y</code> or <code class="option">-k</code>.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">prereq nxdomain</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requires that no resource record of any type exists with name
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">prereq yxdomain</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requires that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein exists (has as at least one resource record, of any type).
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">prereq nxrrset</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Requires that no resource record exists of the specified
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is omitted, IN (internet) is assumed.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">prereq yxrrset</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This requires that a resource record of the specified
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is omitted, IN (internet) is assumed.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">prereq yxrrset</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein from each set of prerequisites of this form
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sharing a common
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are combined to form a set of RRs. This set of RRs must
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein exactly match the set of RRs existing in the zone at the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are written in the standard text representation of the resource
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">update delete</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
852ccdd42a71550c974111b49415204ffeca6573Automatic Updater [type [data...]]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Deletes any resource records named
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <em class="parameter"><code>domain-name</code></em>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is provided, only matching resource records will be removed.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The internet class is assumed if
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is not supplied. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is ignored, and is only allowed for compatibility.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">update add</strong></span>
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews {domain-name}
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Adds a new resource record with the specified
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">show</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Displays the current message, containing all of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein prerequisites and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein updates specified since the last send.
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">send</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Sends the current message. This is equivalent to entering a
69f175fc57a578dd85c1548ed3f34284321f9d3aMark Andrews <span><strong class="command">answer</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Displays the answer.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater <span><strong class="command">debug</strong></span>
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater Turn on debugging.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Lines beginning with a semicolon are comments and are ignored.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The examples below show how
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span><strong class="command">nsupdate</strong></span>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein could be used to insert and delete resource records from the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Notice that the input in each example contains a trailing blank line so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a group of commands are sent as one dynamic update request to the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein master name server for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> update delete oldhost.example.com A
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> update add newhost.example.com 86400 A 172.16.1.1
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Any A records for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are deleted.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews And an A record for
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews with IP address 172.16.1.1 is added.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews The newly-added record has a 1 day TTL (86400 seconds).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> prereq nxdomain nickname.example.com
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> update add nickname.example.com 86400 CNAME somehost.example.com
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The prerequisite condition gets the name server to check that there
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein are no resource records of any type for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If there are, the update request fails.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein If this name does not exist, a CNAME for it is added.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This ensures that when the CNAME is added, it cannot conflict with the
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater long-standing rule in RFC 1034 that a name must not exist as any other
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein record type if it exists as a CNAME.
d060d8669f5558690e7faf4a1c12fe5c02a7c60dAutomatic Updater (The rule has been updated for DNSSEC in RFC 2535 to allow CNAMEs to have
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein RRSIG, DNSKEY and NSEC records.)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">/etc/resolv.conf</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein used to identify default name server
90c38ab4e6904126bec2f2f57f60cd834ce759cbAutomatic Updater<dt><span class="term"><code class="constant">/var/run/named/session.key</code></span></dt>
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt sets the default TSIG key for use in local-only mode
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">K{name}.+157.+{random}.key</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein base-64 encoding of HMAC-MD5 key created by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<dt><span class="term"><code class="constant">K{name}.+157.+{random}.private</code></span></dt>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein base-64 encoding of HMAC-MD5 key created by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt <span class="citerefentry"><span class="refentrytitle">ddns-confgen</span>(8)</span>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The TSIG key is redundantly stored in two separate files.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This is a consequence of nsupdate using the DST library
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein for its cryptographic operations, and may change in future