0N/A<!
DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 0N/A [<!ENTITY mdash "—">]>
0N/A - Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") 0N/A - Copyright (C) 2000-2003 Internet Software Consortium. 0N/A - Permission to use, copy, modify, and/or distribute this software for any 2362N/A - purpose with or without fee is hereby granted, provided that the above 0N/A - copyright notice and this permission notice appear in all copies. 0N/A - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 0N/A - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 0N/A - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 0N/A - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 0N/A - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 0N/A - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 0N/A - PERFORMANCE OF THIS SOFTWARE. 0N/A <
date>Aug 25, 2009</
date>
0N/A <
refentrytitle><
application>nsupdate</
application></
refentrytitle>
0N/A <
manvolnum>1</
manvolnum>
0N/A <
refmiscinfo>BIND9</
refmiscinfo>
0N/A <
refname><
application>nsupdate</
application></
refname>
0N/A <
refpurpose>Dynamic DNS update utility</
refpurpose>
0N/A <
holder>Internet Systems Consortium, Inc. ("ISC")</
holder>
0N/A <
holder>Internet Software Consortium.</
holder>
2398N/A <
command>nsupdate</
command>
2398N/A <
arg><
option>-d</
option></
arg>
0N/A <
arg><
option>-D</
option></
arg>
0N/A <
arg><
option>-g</
option></
arg>
0N/A <
arg><
option>-o</
option></
arg>
2398N/A <
arg><
option>-l</
option></
arg>
0N/A <
arg><
option>-y <
replaceable class="parameter"><
optional>hmac:</
optional>keyname:secret</
replaceable></
option></
arg>
0N/A <
arg><
option>-k <
replaceable class="parameter">keyfile</
replaceable></
option></
arg>
2398N/A <
arg><
option>-t <
replaceable class="parameter">timeout</
replaceable></
option></
arg>
2398N/A <
arg><
option>-u <
replaceable class="parameter">udptimeout</
replaceable></
option></
arg>
2398N/A <
arg><
option>-r <
replaceable class="parameter">udpretries</
replaceable></
option></
arg>
2398N/A <
arg><
option>-R <
replaceable class="parameter">randomdev</
replaceable></
option></
arg>
2398N/A <
arg><
option>-v</
option></
arg>
2398N/A <
arg><
option>-T</
option></
arg>
2398N/A <
arg><
option>-P</
option></
arg>
2398N/A <
para><
command>nsupdate</
command>
2398N/A is used to submit Dynamic DNS Update requests as defined in RFC 2136
2398N/A This allows resource records to be added or removed from a zone
2398N/A without manually editing the zone file.
2398N/A A single update request can contain requests to add or remove more than
2398N/A Zones that are under dynamic control via
2398N/A <
command>nsupdate</
command>
0N/A or a DHCP server should not be edited by hand.
0N/A conflict with dynamic updates and cause data to be lost.
2398N/A The resource records that are dynamically added or removed with
0N/A <
command>nsupdate</
command>
0N/A have to be in the same zone.
2398N/A Requests are sent to the zone's master server.
2398N/A This is identified by the MNAME field of the zone's SOA record.
0N/A <
command>nsupdate</
command>
2398N/A This provides tracing information about the update requests that are
2398N/A made and the replies received from the name server.
2398N/A The <
option>-D</
option> option makes <
command>nsupdate</
command>
2398N/A report additional debugging information to <
option>-d</
option>.
2398N/A The <
option>-L</
option> option with an integer argument of zero or
2398N/A higher sets the logging debug level. If zero, logging is disabled.
2398N/A Transaction signatures can be used to authenticate the Dynamic
2398N/A DNS updates. These use the TSIG resource record type described
2398N/A in RFC 2845 or the SIG(0) record described in RFC 2535 and
2398N/A RFC 2931 or GSS-TSIG as described in RFC 3645. TSIG relies on
2398N/A a shared secret that should only be known to
2398N/A <
command>nsupdate</
command> and the name server. Currently,
2398N/A the only supported encryption algorithm for TSIG is HMAC-MD5,
2398N/A which is defined in RFC 2104. Once other algorithms are
2398N/A defined for TSIG, applications will need to ensure they select
2398N/A the appropriate algorithm as well as the key when authenticating
0N/A each other. For instance, suitable <
type>key</
type> and
0N/A <
type>server</
type> statements would be added to
0N/A can associate the appropriate secret key and algorithm with
0N/A the IP address of the client application that will be using
0N/A TSIG authentication. SIG(0) uses public key cryptography.
0N/A To use a SIG(0) key, the public key must be stored in a KEY
0N/A record in a zone served by the name server.
0N/A <
command>nsupdate</
command> does not read
0N/A GSS-TSIG uses Kerberos credentials. Standard GSS-TSIG mode
0N/A is switched on with the <
option>-g</
option> flag. A
0N/A non-standards-compliant variant of GSS-TSIG used by Windows
0N/A 2000 can be switched on with the <
option>-o</
option> flag.
0N/A <
para><
command>nsupdate</
command>
0N/A uses the <
option>-y</
option> or <
option>-k</
option> option
0N/A to provide the shared secret needed to generate a TSIG record
0N/A for authenticating Dynamic DNS update requests, default type
0N/A HMAC-MD5. These options are mutually exclusive.
0N/A When the <
option>-y</
option> option is used, a signature is
0N/A <
optional><
parameter>hmac:</
parameter></
optional><
parameter>keyname:secret.</
parameter>
0N/A <
parameter>keyname</
parameter> is the name of the key, and
0N/A <
parameter>secret</
parameter> is the base64 encoded shared secret.
0N/A Use of the <
option>-y</
option> option is discouraged because the
0N/A shared secret is supplied as a command line argument in clear text.
0N/A This may be visible in the output from
0N/A <
refentrytitle>ps</
refentrytitle><
manvolnum>1</
manvolnum>
0N/A or in a history file maintained by the user's shell.
0N/A <
option>-k</
option> option, <
command>nsupdate</
command> reads
0N/A the shared secret from the file <
parameter>keyfile</
parameter>.
0N/A Keyfiles may be in two formats: a single file containing
0N/A statement, which may be generated automatically by
0N/A <
command>ddns-confgen</
command>, or a pair of files whose names are
0N/A of the format <
filename>K{name}.+157.+{random}.key</
filename> and
0N/A <
filename>K{name}.+157.+{random}.private</
filename>, which can be
0N/A generated by <
command>dnssec-keygen</
command>.
0N/A The <
option>-k</
option> may also be used to specify a SIG(0) key used
0N/A to authenticate Dynamic DNS update requests. In this case, the key
2399N/A specified is not an HMAC-MD5 key.
2399N/A <
command>nsupdate</
command> can be run in a local-host only mode
2399N/A using the <
option>-l</
option> flag. This sets the server address to
2399N/A localhost (disabling the <
command>server</
command> so that the server
2399N/A address cannot be overridden). Connections to the local server will
2399N/A which is automatically generated by <
command>named</
command> if any
2399N/A local master zone has set <
command>update-policy</
command> to
2399N/A <
command>local</
command>. The location of this key file can be
2399N/A overridden with the <
option>-k</
option> option.
0N/A By default, <
command>nsupdate</
command>
0N/A uses UDP to send update requests to the name server unless they are too
0N/A large to fit in a UDP request in which case TCP will be used.
0N/A <
command>nsupdate</
command>
0N/A use a TCP connection.
0N/A This may be preferable when a batch of update requests is made.
0N/A The <
option>-p</
option> sets the default port number to use for
0N/A connections to a name server. The default is 53.
0N/A The <
option>-t</
option> option sets the maximum time an update request
0N/A take before it is aborted. The default is 300 seconds. Zero can be
0N/A to disable the timeout.
0N/A The <
option>-u</
option> option sets the UDP retry interval. The default
0N/A 3 seconds. If zero, the interval will be computed from the timeout
0N/A and number of UDP retries.
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.
The <
option>-T</
option> and <
option>-P</
option> print out a
lists of non-meta types for which the type specific presentation
format is known. <
option>-T</
option> prints out the list of
assigned types. <
option>-P</
option> prints out the list of
private types. These options may be combined. nsupdate will
exit after the lists are printed.
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,
(<backslash> <hash> <space> <length>
<space> <hexstring>).
<
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>gsstsig</
command>
Use GSS-TSIG to sign the updated. This is equivalent to
specifying <
option>-g</
option> on the commandline.
<
command>oldgsstsig</
command>
Use the Windows 2000 version of GSS-TSIG to sign the updated.
This is equivalent to specifying <
option>-o</
option> on the
<
arg choice="req"><
optional>realm_name</
optional></
arg>
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.
<
command><
optional>prereq</
optional> nxdomain</
command>
<
arg choice="req">domain-name</
arg>
Requires that no resource record of any type exists with name
<
parameter>domain-name</
parameter>.
<
command><
optional>prereq</
optional> yxdomain</
command>
<
arg choice="req">domain-name</
arg>
<
parameter>domain-name</
parameter>
exists (has as at least one resource record, of any type).
<
command><
optional>prereq</
optional> 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><
optional>prereq</
optional> 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><
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>
<
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><
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>
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><
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>
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 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.)
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>
<
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>,
<
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