4632N/A<!
DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 4632N/A [<!ENTITY mdash "—">]>
4632N/A - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") 4632N/A - Copyright (C) 2000-2003 Internet Software Consortium. 4632N/A - Permission to use, copy, modify, and/or distribute this software for any 4632N/A - purpose with or without fee is hereby granted, provided that the above 4632N/A - copyright notice and this permission notice appear in all copies. 4632N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 4632N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 4632N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 4632N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 4632N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 4632N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 4632N/A - PERFORMANCE OF THIS SOFTWARE. 4632N/A <
refentrytitle><
application>nsupdate</
application></
refentrytitle>
4632N/A <
refmiscinfo>BIND9</
refmiscinfo>
4632N/A <
refname><
application>nsupdate</
application></
refname>
4632N/A <
refpurpose>Dynamic DNS update utility</
refpurpose>
4632N/A <
holder>Internet Systems Consortium, Inc. ("ISC")</
holder>
4632N/A <
holder>Internet Software Consortium.</
holder>
4632N/A <
command>nsupdate</
command>
4632N/A <
arg><
option>-d</
option></
arg>
4632N/A <
arg><
option>-D</
option></
arg>
4632N/A <
arg><
option>-g</
option></
arg>
4632N/A <
arg><
option>-o</
option></
arg>
4632N/A <
arg><
option>-l</
option></
arg>
4632N/A <
arg><
option>-y <
replaceable class="parameter"><
optional>hmac:</
optional>keyname:secret</
replaceable></
option></
arg>
4632N/A <
arg><
option>-k <
replaceable class="parameter">keyfile</
replaceable></
option></
arg>
4632N/A <
arg><
option>-t <
replaceable class="parameter">timeout</
replaceable></
option></
arg>
4632N/A <
arg><
option>-u <
replaceable class="parameter">udptimeout</
replaceable></
option></
arg>
4632N/A <
arg><
option>-r <
replaceable class="parameter">udpretries</
replaceable></
option></
arg>
4632N/A <
arg><
option>-R <
replaceable class="parameter">randomdev</
replaceable></
option></
arg>
4632N/A <
arg><
option>-v</
option></
arg>
4632N/A <
para><
command>nsupdate</
command>
4632N/A is used to submit Dynamic DNS Update requests as defined in RFC2136
4632N/A This allows resource records to be added or removed from a zone
4632N/A without manually editing the zone file.
4632N/A A single update request can contain requests to add or remove more than
4632N/A Zones that are under dynamic control via
4632N/A <
command>nsupdate</
command>
4632N/A or a DHCP server should not be edited by hand.
4632N/A conflict with dynamic updates and cause data to be lost.
4632N/A The resource records that are dynamically added or removed with
4632N/A <
command>nsupdate</
command>
4632N/A have to be in the same zone.
4632N/A Requests are sent to the zone's master server.
4632N/A This is identified by the MNAME field of the zone's SOA record.
4632N/A <
command>nsupdate</
command>
4632N/A This provides tracing information about the update requests that are
4632N/A made and the replies received from the name server.
4632N/A The <
option>-D</
option> option makes <
command>nsupdate</
command>
4632N/A report additional debugging information to <
option>-d</
option>.
5332N/A The <
option>-L</
option> option with an integer argument of zero or
5332N/A higher sets the logging debug level. If zero, logging is disabled.
5332N/A Transaction signatures can be used to authenticate the Dynamic
5332N/A DNS updates. These use the TSIG resource record type described
5332N/A in RFC2845 or the SIG(0) record described in RFC3535 and
5332N/A RFC2931 or GSS-TSIG as described in RFC3645. TSIG relies on
5332N/A a shared secret that should only be known to
4632N/A <
command>nsupdate</
command> and the name server. Currently,
4632N/A the only supported encryption algorithm for TSIG is HMAC-MD5,
4632N/A which is defined in RFC 2104. Once other algorithms are
4632N/A defined for TSIG, applications will need to ensure they select
4632N/A the appropriate algorithm as well as the key when authenticating
4632N/A each other. For instance, suitable <
type>key</
type> and
4632N/A <
type>server</
type> statements would be added to
4632N/A can associate the appropriate secret key and algorithm with
4632N/A the IP address of the client application that will be using
4632N/A TSIG authentication. SIG(0) uses public key cryptography.
4632N/A To use a SIG(0) key, the public key must be stored in a KEY
4632N/A record in a zone served by the name server.
4632N/A <
command>nsupdate</
command> does not read
4632N/A GSS-TSIG uses Kerberos credentials.
4632N/A <
para><
command>nsupdate</
command>
4632N/A uses the <
option>-y</
option> or <
option>-k</
option> option
4632N/A to provide the shared secret needed to generate a TSIG record
4632N/A for authenticating Dynamic DNS update requests, default type
4632N/A HMAC-MD5. These options are mutually exclusive.
4632N/A When the <
option>-y</
option> option is used, a signature is
4632N/A <
optional><
parameter>hmac:</
parameter></
optional><
parameter>keyname:secret.</
parameter>
4632N/A <
parameter>keyname</
parameter> is the name of the key, and
4632N/A <
parameter>secret</
parameter> is the base64 encoded shared secret.
4632N/A Use of the <
option>-y</
option> option is discouraged because the
4632N/A shared secret is supplied as a command line argument in clear text.
4632N/A This may be visible in the output from
4632N/A <
refentrytitle>ps</
refentrytitle><
manvolnum>1</
manvolnum>
4632N/A or in a history file maintained by the user's shell.
4632N/A <
option>-k</
option> option, <
command>nsupdate</
command> reads
4632N/A the shared secret from the file <
parameter>keyfile</
parameter>.
4632N/A Keyfiles may be in two formats: a single file containing
4632N/A statement, which may be generated automatically by
4632N/A <
command>ddns-confgen</
command>, or a pair of files whose names are
4632N/A of the format <
filename>K{name}.+157.+{random}.key</
filename> and
4632N/A <
filename>K{name}.+157.+{random}.private</
filename>, which can be
4632N/A generated by <
command>dnssec-keygen</
command>.
4632N/A The <
option>-k</
option> may also be used to specify a SIG(0) key used
4632N/A to authenticate Dynamic DNS update requests. In this case, the key
4632N/A specified is not an HMAC-MD5 key.
4632N/A <
command>nsupdate</
command> can be run in a local-host only mode
4632N/A using the <
option>-l</
option> flag. This sets the server address to
4632N/A localhost (disabling the <
command>server</
command> so that the server
4632N/A address cannot be overridden). Connections to the local server will
4632N/A which is automatically generated by <
command>named</
command> if any
4632N/A local master zone has set <
command>update-policy</
command> to
4632N/A <
command>local</
command>. The location of this key file can be
4632N/A overridden with the <
option>-k</
option> option.
4632N/A By default, <
command>nsupdate</
command>
4632N/A uses UDP to send update requests to the name server unless they are too
4632N/A large to fit in a UDP request in which case TCP will be used.
4632N/A <
command>nsupdate</
command>
4632N/A This may be preferable when a batch of update requests is made.
4632N/A The <
option>-p</
option> sets the default port number to use for
4632N/A connections to a name server. The default is 53.
4632N/A The <
option>-t</
option> option sets the maximum time an update request
4632N/A take before it is aborted. The default is 300 seconds. Zero can be
4632N/A The <
option>-u</
option> option sets the UDP retry interval. The default
4632N/A 3 seconds. If zero, the interval will be computed from the timeout
The <
option>-r</
option> option sets the number of UDP retries. The
3. If zero, only one update request will be made.
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.
<
title>INPUT FORMAT</
title>
<
para><
command>nsupdate</
command>
<
parameter>filename</
parameter>
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
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
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)
accumulated commands to be sent as one Dynamic DNS update request to the
The command formats and their meaning are as follows:
<
command>server</
command>
<
arg choice="req">servername</
arg>
<
arg choice="opt">port</
arg>
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
<
parameter>port</
parameter>
<
parameter>servername</
parameter>
where the dynamic update requests get sent.
If no port number is specified, the default DNS port number of
<
arg choice="req">address</
arg>
<
arg choice="opt">port</
arg>
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
<
parameter>port</
parameter>
can additionally be used to make requests come from a specific
If no port number is specified, the system will assign one.
<
arg choice="req">zonename</
arg>
Specifies that all updates are to be made to the zone
<
parameter>zonename</
parameter>.
<
parameter>zone</
parameter>
<
command>nsupdate</
command>
will attempt determine the correct zone to update based on the
<
arg choice="req">classname</
arg>
Specify the default class.
If no <
parameter>class</
parameter> is specified, the
<
parameter>IN</
parameter>.
<
arg choice="req">seconds</
arg>
Specify the default time to live for records to be added.
The value <
parameter>none</
parameter> will clear the default
<
arg choice="req">name</
arg>
<
arg choice="req">secret</
arg>
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>.
<
command>prereq nxdomain</
command>
<
arg choice="req">domain-name</
arg>
Requires that no resource record of any type exists with name
<
parameter>domain-name</
parameter>.
<
command>prereq yxdomain</
command>
<
arg choice="req">domain-name</
arg>
<
parameter>domain-name</
parameter>
exists (has as at least one resource record, of any type).
<
command>prereq nxrrset</
command>
<
arg choice="req">domain-name</
arg>
<
arg choice="opt">class</
arg>
<
arg choice="req">type</
arg>
Requires that no resource record exists of the specified
<
parameter>type</
parameter>,
<
parameter>class</
parameter>
<
parameter>domain-name</
parameter>.
<
parameter>class</
parameter>
is omitted, IN (internet) is assumed.
<
command>prereq yxrrset</
command>
<
arg choice="req">domain-name</
arg>
<
arg choice="opt">class</
arg>
<
arg choice="req">type</
arg>
This requires that a resource record of the specified
<
parameter>type</
parameter>,
<
parameter>class</
parameter>
<
parameter>domain-name</
parameter>
<
parameter>class</
parameter>
is omitted, IN (internet) is assumed.
<
command>prereq 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>
<
parameter>data</
parameter>
from each set of prerequisites of this form
<
parameter>type</
parameter>,
<
parameter>class</
parameter>,
<
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
<
parameter>type</
parameter>,
<
parameter>class</
parameter>,
<
parameter>domain-name</
parameter>.
<
parameter>data</
parameter>
are written in the standard text representation of the resource
<
command>update delete</
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>
Deletes any resource records named
<
parameter>domain-name</
parameter>.
<
parameter>type</
parameter>
<
parameter>data</
parameter>
is provided, only matching resource records will be removed.
The internet class is assumed if
<
parameter>class</
parameter>
<
parameter>ttl</
parameter>
is ignored, and is only allowed for compatibility.
<
command>update 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>
Adds a new resource record with the specified
<
parameter>ttl</
parameter>,
<
parameter>class</
parameter>
<
parameter>data</
parameter>.
Displays the current message, containing all of the
updates specified since the last send.
Sends the current message. This is equivalent to entering a
<
command>answer</
command>
Lines beginning with a semicolon are comments and are ignored.
The examples below show how
<
command>nsupdate</
command>
could be used to insert and delete resource records from the
Notice that the input in each example contains a trailing blank line so
a group of commands are sent as one dynamic update request to the
with IP address 172.16.1.1 is added.
The newly-added record has a 1 day TTL (86400 seconds).
The prerequisite condition gets the name server to check that there
are no resource records of any type for
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.)
used to identify default name server
sets the default TSIG key for use in local-only mode
<
term><
constant>K{name}.+157.+{random}.key</
constant></
term>
base-64 encoding of HMAC-MD5 key created by
<
refentrytitle>dnssec-keygen</
refentrytitle><
manvolnum>8</
manvolnum>
<
term><
constant>K{name}.+157.+{random}.private</
constant></
term>
base-64 encoding of HMAC-MD5 key created by
<
refentrytitle>dnssec-keygen</
refentrytitle><
manvolnum>8</
manvolnum>
<
refentrytitle>RFC2136</
refentrytitle>
<
refentrytitle>RFC3007</
refentrytitle>
<
refentrytitle>RFC2104</
refentrytitle>
<
refentrytitle>RFC2845</
refentrytitle>
<
refentrytitle>RFC1034</
refentrytitle>
<
refentrytitle>RFC2535</
refentrytitle>
<
refentrytitle>RFC2931</
refentrytitle>
<
refentrytitle>named</
refentrytitle><
manvolnum>8</
manvolnum>
<
refentrytitle>ddns-confgen</
refentrytitle><
manvolnum>8</
manvolnum>
<
refentrytitle>dnssec-keygen</
refentrytitle><
manvolnum>8</
manvolnum>
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