nsupdate.docbook revision 5fa46bc91672ef5737aee6f99763161511566c24
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte [<!ENTITY mdash "&#8212;">]>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<!--
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - Copyright (C) 2000-2003 Internet Software Consortium.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - Permission to use, copy, modify, and/or distribute this software for any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - purpose with or without fee is hereby granted, provided that the above
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - copyright notice and this permission notice appear in all copies.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte - PERFORMANCE OF THIS SOFTWARE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte-->
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<!-- $Id$ -->
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte<refentry id="man.nsupdate">
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <refentryinfo>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <date>Aug 25, 2009</date>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </refentryinfo>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refmeta>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refentrytitle><application>nsupdate</application></refentrytitle>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <manvolnum>1</manvolnum>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refmiscinfo>BIND9</refmiscinfo>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </refmeta>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refnamediv>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <refname><application>nsupdate</application></refname>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refpurpose>Dynamic DNS update utility</refpurpose>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </refnamediv>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <docinfo>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <copyright>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2004</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2005</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2006</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2007</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2008</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2009</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2010</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2011</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2012</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </copyright>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <copyright>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2000</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2001</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2002</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <year>2003</year>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <holder>Internet Software Consortium.</holder>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </copyright>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </docinfo>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refsynopsisdiv>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <cmdsynopsis>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-d</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-D</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <group>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-g</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-o</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-l</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </group>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-R <replaceable class="parameter">randomdev</replaceable></option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-v</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-T</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg><option>-P</option></arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <arg>filename</arg>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </cmdsynopsis>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </refsynopsisdiv>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refsect1>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <title>DESCRIPTION</title>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para><command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte is used to submit Dynamic DNS Update requests as defined in RFC 2136
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte to a name server.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte This allows resource records to be added or removed from a zone
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte without manually editing the zone file.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte A single update request can contain requests to add or remove more than
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte one
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte resource record.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Zones that are under dynamic control via
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte or a DHCP server should not be edited by hand.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Manual edits could
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte conflict with dynamic updates and cause data to be lost.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The resource records that are dynamically added or removed with
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte have to be in the same zone.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Requests are sent to the zone's master server.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte This is identified by the MNAME field of the zone's SOA record.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <option>-d</option>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte option makes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng operate in debug mode.
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng This provides tracing information about the update requests that are
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng made and the replies received from the name server.
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng </para>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <para>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng The <option>-D</option> option makes <command>nsupdate</command>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng report additional debugging information to <option>-d</option>.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The <option>-L</option> option with an integer argument of zero or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte higher sets the logging debug level. If zero, logging is disabled.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Transaction signatures can be used to authenticate the Dynamic
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte DNS updates. These use the TSIG resource record type described
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte in RFC 2845 or the SIG(0) record described in RFC 2535 and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte RFC 2931 or GSS-TSIG as described in RFC 3645. TSIG relies on
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte a shared secret that should only be known to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command> and the name server. Currently,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte the only supported encryption algorithm for TSIG is HMAC-MD5,
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng which is defined in RFC 2104. Once other algorithms are
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng defined for TSIG, applications will need to ensure they select
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng the appropriate algorithm as well as the key when authenticating
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng each other. For instance, suitable <type>key</type> and
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <type>server</type> statements would be added to
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <filename>/etc/named.conf</filename> so that the name server
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng can associate the appropriate secret key and algorithm with
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng the IP address of the client application that will be using
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng TSIG authentication. SIG(0) uses public key cryptography.
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng To use a SIG(0) key, the public key must be stored in a KEY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte record in a zone served by the name server.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command> does not read
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <filename>/etc/named.conf</filename>.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte GSS-TSIG uses Kerberos credentials. Standard GSS-TSIG mode
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte is switched on with the <option>-g</option> flag. A
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte non-standards-compliant variant of GSS-TSIG used by Windows
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte 2000 can be switched on with the <option>-o</option> flag.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para><command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uses the <option>-y</option> or <option>-k</option> option
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte to provide the shared secret needed to generate a TSIG record
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for authenticating Dynamic DNS update requests, default type
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HMAC-MD5. These options are mutually exclusive.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte When the <option>-y</option> option is used, a signature is
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte generated from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <optional><parameter>hmac:</parameter></optional><parameter>keyname:secret.</parameter>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <parameter>keyname</parameter> is the name of the key, and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <parameter>secret</parameter> is the base64 encoded shared secret.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Use of the <option>-y</option> option is discouraged because the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte shared secret is supplied as a command line argument in clear text.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte This may be visible in the output from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <citerefentry>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </citerefentry>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte or in a history file maintained by the user's shell.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte With the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <option>-k</option> option, <command>nsupdate</command> reads
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng the shared secret from the file <parameter>keyfile</parameter>.
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng Keyfiles may be in two formats: a single file containing
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng a <filename>named.conf</filename>-format <command>key</command>
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng statement, which may be generated automatically by
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <command>ddns-confgen</command>, or a pair of files whose names are
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng of the format <filename>K{name}.+157.+{random}.key</filename> and
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng <filename>K{name}.+157.+{random}.private</filename>, which can be
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng generated by <command>dnssec-keygen</command>.
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng The <option>-k</option> may also be used to specify a SIG(0) key used
d4b0f84707225327c617c6838361d3cfb7762b34Jack Meng to authenticate Dynamic DNS update requests. In this case, the key
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte specified is not an HMAC-MD5 key.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command> can be run in a local-host only mode
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte using the <option>-l</option> flag. This sets the server address to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte localhost (disabling the <command>server</command> so that the server
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte address cannot be overridden). Connections to the local server will
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte use a TSIG key found in <filename>/var/run/named/session.key</filename>,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte which is automatically generated by <command>named</command> if any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte local master zone has set <command>update-policy</command> to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>local</command>. The location of this key file can be
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte overridden with the <option>-k</option> option.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte By default, <command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uses UDP to send update requests to the name server unless they are too
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte large to fit in a UDP request in which case TCP will be used.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <option>-v</option>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte option makes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <command>nsupdate</command>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte use a TCP connection.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte This may be preferable when a batch of update requests is made.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte </para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte <para>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte The <option>-p</option> sets the default port number to use for
connections to a name server. The default is 53.
</para>
<para>
The <option>-t</option> option sets the maximum time an update request
can
take before it is aborted. The default is 300 seconds. Zero can be
used
to disable the timeout.
</para>
<para>
The <option>-u</option> option sets the UDP retry interval. The default
is
3 seconds. If zero, the interval will be computed from the timeout
interval
and number of UDP retries.
</para>
<para>
The <option>-r</option> option sets the number of UDP retries. The
default is
3. If zero, only one update request will be made.
</para>
<para>
The <option>-R <replaceable
class="parameter">randomdev</replaceable></option> option
specifies a source of randomness. If the operating system
does not provide a <filename>/dev/random</filename> or
equivalent device, the default source of randomness is keyboard
input. <filename>randomdev</filename> specifies the name of
a character device or file containing random data to be used
instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard input
should be used. This option may be specified multiple times.
</para>
<para>
Other types can be entered using "TYPEXXXXX" where "XXXXX" is the
decimal value of the type with no leading zeros. The rdata,
if present, will be parsed using the UNKNOWN rdata format,
(&lt;backslash&gt; &lt;hash&gt; &lt;space&gt; &lt;length&gt;
&lt;space&gt; &lt;hexstring&gt;).
</para>
<para>
The <option>-T</option> and <option>-P</option> options print out
lists of non-meta types for which the type-specific presentation
formats are known. <option>-T</option> prints out the list of
IANA-assigned types. <option>-P</option> prints out the list of
private types specific to <command>named</command>. These options
may be combined. <command>nsupdate</command> will exit after the
lists are printed.
</para>
</refsect1>
<refsect1>
<title>INPUT FORMAT</title>
<para><command>nsupdate</command>
reads input from
<parameter>filename</parameter>
or standard input.
Each command is supplied on exactly one line of input.
Some commands are for administrative purposes.
The others are either update instructions or prerequisite checks on the
contents of the zone.
These checks set conditions that some name or set of
resource records (RRset) either exists or is absent from the zone.
These conditions must be met if the entire update request is to succeed.
Updates will be rejected if the tests for the prerequisite conditions
fail.
</para>
<para>
Every update request consists of zero or more prerequisites
and zero or more updates.
This allows a suitably authenticated update request to proceed if some
specified resource records are present or missing from the zone.
A blank input line (or the <command>send</command> command)
causes the
accumulated commands to be sent as one Dynamic DNS update request to the
name server.
</para>
<para>
The command formats and their meaning are as follows:
<variablelist>
<varlistentry>
<term>
<command>server</command>
<arg choice="req">servername</arg>
<arg choice="opt">port</arg>
</term>
<listitem>
<para>
Sends all dynamic update requests to the name server
<parameter>servername</parameter>.
When no server statement is provided,
<command>nsupdate</command>
will send updates to the master server of the correct zone.
The MNAME field of that zone's SOA record will identify the
master
server for that zone.
<parameter>port</parameter>
is the port number on
<parameter>servername</parameter>
where the dynamic update requests get sent.
If no port number is specified, the default DNS port number of
53 is
used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>local</command>
<arg choice="req">address</arg>
<arg choice="opt">port</arg>
</term>
<listitem>
<para>
Sends all dynamic update requests using the local
<parameter>address</parameter>.
When no local statement is provided,
<command>nsupdate</command>
will send updates using an address and port chosen by the
system.
<parameter>port</parameter>
can additionally be used to make requests come from a specific
port.
If no port number is specified, the system will assign one.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>zone</command>
<arg choice="req">zonename</arg>
</term>
<listitem>
<para>
Specifies that all updates are to be made to the zone
<parameter>zonename</parameter>.
If no
<parameter>zone</parameter>
statement is provided,
<command>nsupdate</command>
will attempt determine the correct zone to update based on the
rest of the input.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>class</command>
<arg choice="req">classname</arg>
</term>
<listitem>
<para>
Specify the default class.
If no <parameter>class</parameter> is specified, the
default class is
<parameter>IN</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>ttl</command>
<arg choice="req">seconds</arg>
</term>
<listitem>
<para>
Specify the default time to live for records to be added.
The value <parameter>none</parameter> will clear the default
ttl.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>key</command>
<arg choice="req">name</arg>
<arg choice="req">secret</arg>
</term>
<listitem>
<para>
Specifies that all updates are to be TSIG-signed using the
<parameter>keyname</parameter> <parameter>keysecret</parameter> pair.
The <command>key</command> command
overrides any key specified on the command line via
<option>-y</option> or <option>-k</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>gsstsig</command>
</term>
<listitem>
<para>
Use GSS-TSIG to sign the updated. This is equivalent to
specifying <option>-g</option> on the commandline.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>oldgsstsig</command>
</term>
<listitem>
<para>
Use the Windows 2000 version of GSS-TSIG to sign the updated.
This is equivalent to specifying <option>-o</option> on the
commandline.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>realm</command>
<arg choice="req"><optional>realm_name</optional></arg>
</term>
<listitem>
<para>
When using GSS-TSIG use <parameter>realm_name</parameter> rather
than the default realm in <filename>krb5.conf</filename>. If no
realm is specified the saved realm is cleared.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>prereq</optional> nxdomain</command>
<arg choice="req">domain-name</arg>
</term>
<listitem>
<para>
Requires that no resource record of any type exists with name
<parameter>domain-name</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>prereq</optional> yxdomain</command>
<arg choice="req">domain-name</arg>
</term>
<listitem>
<para>
Requires that
<parameter>domain-name</parameter>
exists (has as at least one resource record, of any type).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>prereq</optional> nxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</term>
<listitem>
<para>
Requires that no resource record exists of the specified
<parameter>type</parameter>,
<parameter>class</parameter>
and
<parameter>domain-name</parameter>.
If
<parameter>class</parameter>
is omitted, IN (internet) is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>prereq</optional> yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</term>
<listitem>
<para>
This requires that a resource record of the specified
<parameter>type</parameter>,
<parameter>class</parameter>
and
<parameter>domain-name</parameter>
must exist.
If
<parameter>class</parameter>
is omitted, IN (internet) is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>prereq</optional> yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</term>
<listitem>
<para>
The
<parameter>data</parameter>
from each set of prerequisites of this form
sharing a common
<parameter>type</parameter>,
<parameter>class</parameter>,
and
<parameter>domain-name</parameter>
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
<parameter>type</parameter>,
<parameter>class</parameter>,
and
<parameter>domain-name</parameter>.
The
<parameter>data</parameter>
are written in the standard text representation of the resource
record's
RDATA.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>update</optional> del<optional>ete</optional></command>
<arg choice="req">domain-name</arg>
<arg choice="opt">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="opt">type <arg choice="opt" rep="repeat">data</arg></arg>
</term>
<listitem>
<para>
Deletes any resource records named
<parameter>domain-name</parameter>.
If
<parameter>type</parameter>
and
<parameter>data</parameter>
is provided, only matching resource records will be removed.
The internet class is assumed if
<parameter>class</parameter>
is not supplied. The
<parameter>ttl</parameter>
is ignored, and is only allowed for compatibility.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command><optional>update</optional> add</command>
<arg choice="req">domain-name</arg>
<arg choice="req">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</term>
<listitem>
<para>
Adds a new resource record with the specified
<parameter>ttl</parameter>,
<parameter>class</parameter>
and
<parameter>data</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>show</command>
</term>
<listitem>
<para>
Displays the current message, containing all of the
prerequisites and
updates specified since the last send.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>send</command>
</term>
<listitem>
<para>
Sends the current message. This is equivalent to entering a
blank line.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>answer</command>
</term>
<listitem>
<para>
Displays the answer.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>debug</command>
</term>
<listitem>
<para>
Turn on debugging.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Lines beginning with a semicolon are comments and are ignored.
</para>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<para>
The examples below show how
<command>nsupdate</command>
could be used to insert and delete resource records from the
<type>example.com</type>
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
<type>example.com</type>.
<programlisting>
# nsupdate
&gt; update delete oldhost.example.com A
&gt; update add newhost.example.com 86400 A 172.16.1.1
&gt; send
</programlisting>
</para>
<para>
Any A records for
<type>oldhost.example.com</type>
are deleted.
And an A record for
<type>newhost.example.com</type>
with IP address 172.16.1.1 is added.
The newly-added record has a 1 day TTL (86400 seconds).
<programlisting>
# nsupdate
&gt; prereq nxdomain nickname.example.com
&gt; update add nickname.example.com 86400 CNAME somehost.example.com
&gt; send
</programlisting>
</para>
<para>
The prerequisite condition gets the name server to check that there
are no resource records of any type for
<type>nickname.example.com</type>.
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 RFC 1034 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 RFC 2535 to allow CNAMEs to have
RRSIG, DNSKEY and NSEC records.)
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<variablelist>
<varlistentry>
<term><constant>/etc/resolv.conf</constant></term>
<listitem>
<para>
used to identify default name server
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>/var/run/named/session.key</constant></term>
<listitem>
<para>
sets the default TSIG key for use in local-only mode
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>K{name}.+157.+{random}.key</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>K{name}.+157.+{random}.private</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citetitle>RFC 2136</citetitle>,
<citetitle>RFC 3007</citetitle>,
<citetitle>RFC 2104</citetitle>,
<citetitle>RFC 2845</citetitle>,
<citetitle>RFC 1034</citetitle>,
<citetitle>RFC 2535</citetitle>,
<citetitle>RFC 2931</citetitle>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>ddns-confgen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
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.
</para>
</refsect1>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->