nsupdate.docbook revision 938440694b33cd752e9e4b71a526368b4811c177
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
b0e8629055a766d4555a005a283c2889a5974945Mark Andrews "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews [<!ENTITY mdash "&#8212;">]>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<!--
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2004-2012, 2014 Internet Systems Consortium, Inc. ("ISC")
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2000-2003 Internet Software Consortium.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Permission to use, copy, modify, and/or distribute this software for any
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - purpose with or without fee is hereby granted, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - copyright notice and this permission notice appear in all copies.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - 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,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein-->
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<refentry id="man.nsupdate">
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews <refentryinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <date>March 10, 2012</date>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </refentryinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refmeta>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refentrytitle><application>nsupdate</application></refentrytitle>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <manvolnum>1</manvolnum>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refmiscinfo>BIND9</refmiscinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </refmeta>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refnamediv>
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews <refname><application>nsupdate</application></refname>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refpurpose>Dynamic DNS update utility</refpurpose>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </refnamediv>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <docinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <copyright>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2004</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2005</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2006</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2007</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2008</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2009</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2010</year>
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews <year>2011</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2012</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2014</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </copyright>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews <copyright>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2000</year>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews <year>2001</year>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews <year>2002</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <year>2003</year>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <holder>Internet Software Consortium.</holder>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </copyright>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </docinfo>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refsynopsisdiv>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <cmdsynopsis>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>nsupdate</command>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-d</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-D</option></arg>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews <group>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews <arg><option>-g</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-o</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-l</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </group>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-R <replaceable class="parameter">randomdev</replaceable></option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-v</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg><option>-T</option></arg>
b05bdb520d83f7ecaad708fe305268c3420be01dMark Andrews <arg><option>-P</option></arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <arg>filename</arg>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </cmdsynopsis>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </refsynopsisdiv>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refsect1>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <title>DESCRIPTION</title>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para><command>nsupdate</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews is used to submit Dynamic DNS Update requests as defined in RFC 2136
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews to a name server.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews This allows resource records to be added or removed from a zone
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews without manually editing the zone file.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews A single update request can contain requests to add or remove more than
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews one
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce resource record.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce <para>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce Zones that are under dynamic control via
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce <command>nsupdate</command>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce or a DHCP server should not be edited by hand.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce Manual edits could
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce conflict with dynamic updates and cause data to be lost.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce </para>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce <para>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce The resource records that are dynamically added or removed with
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews <command>nsupdate</command>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce have to be in the same zone.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce Requests are sent to the zone's master server.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce This is identified by the MNAME field of the zone's SOA record.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce </para>
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <option>-d</option>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option makes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>nsupdate</command>
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.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews The <option>-D</option> option makes <command>nsupdate</command>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews report additional debugging information to <option>-d</option>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-L</option> option with an integer argument of zero or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein higher sets the logging debug level. If zero, logging is disabled.
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews </para>
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Transaction signatures can be used to authenticate the Dynamic
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews DNS updates. These use the TSIG resource record type described
b05bdb520d83f7ecaad708fe305268c3420be01dMark Andrews in RFC 2845 or the SIG(0) record described in RFC 2535 and
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews RFC 2931 or GSS-TSIG as described in RFC 3645. TSIG relies on
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a shared secret that should only be known to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>nsupdate</command> and the name server. Currently,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the only supported encryption algorithm for TSIG is HMAC-MD5,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein which is defined in RFC 2104. Once other algorithms are
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews defined for TSIG, applications will need to ensure they select
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the appropriate algorithm as well as the key when authenticating
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein each other. For instance, suitable <type>key</type> and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <type>server</type> statements would be added to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <filename>/etc/named.conf</filename> so that the name server
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews can associate the appropriate secret key and algorithm with
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein the IP address of the client application that will be using
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein TSIG authentication. SIG(0) uses public key cryptography.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein To use a SIG(0) key, the public key must be stored in a KEY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein record in a zone served by the name server.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>nsupdate</command> does not read
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <filename>/etc/named.conf</filename>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews GSS-TSIG uses Kerberos credentials. Standard GSS-TSIG mode
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is switched on with the <option>-g</option> flag. A
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews non-standards-compliant variant of GSS-TSIG used by Windows
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 2000 can be switched on with the <option>-o</option> flag.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para><command>nsupdate</command>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein uses the <option>-y</option> or <option>-k</option> option
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews to provide the shared secret needed to generate a TSIG record
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews for authenticating Dynamic DNS update requests, default type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein HMAC-MD5. These options are mutually exclusive.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein When the <option>-y</option> option is used, a signature is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein generated from
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <optional><parameter>hmac:</parameter></optional><parameter>keyname:secret.</parameter>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <parameter>keyname</parameter> is the name of the key, and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <parameter>secret</parameter> is the base64 encoded shared secret.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Use of the <option>-y</option> option is discouraged because the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein shared secret is supplied as a command line argument in clear text.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This may be visible in the output from
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <citerefentry>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
47012ae6dbf18a2503d7b33c1c9583dc38625cb7Mark Andrews </citerefentry>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein or in a history file maintained by the user's shell.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein With the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <option>-k</option> option, <command>nsupdate</command> reads
68b30890ebd441a6a1ae3fdf71744d07d02cd030Mark Andrews the shared secret from the file <parameter>keyfile</parameter>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Keyfiles may be in two formats: a single file containing
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a <filename>named.conf</filename>-format <command>key</command>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein statement, which may be generated automatically by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>ddns-confgen</command>, or a pair of files whose names are
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein of the format <filename>K{name}.+157.+{random}.key</filename> and
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <filename>K{name}.+157.+{random}.private</filename>, which can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein generated by <command>dnssec-keygen</command>.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-k</option> may also be used to specify a SIG(0) key used
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews to authenticate Dynamic DNS update requests. In this case, the key
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews specified is not an HMAC-MD5 key.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <para>
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews <command>nsupdate</command> can be run in a local-host only mode
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews using the <option>-l</option> flag. This sets the server address to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews localhost (disabling the <command>server</command> so that the server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews address cannot be overridden). Connections to the local server will
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews use a TSIG key found in <filename>/var/run/named/session.key</filename>,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein which is automatically generated by <command>named</command> if any
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein local master zone has set <command>update-policy</command> to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>local</command>. The location of this key file can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein overridden with the <option>-k</option> option.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein By default, <command>nsupdate</command>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein uses UDP to send update requests to the name server unless they are too
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews large to fit in a UDP request in which case TCP will be used.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <option>-v</option>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein option makes
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <command>nsupdate</command>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein use a TCP connection.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein This may be preferable when a batch of update requests is made.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-p</option> sets the default port number to use for
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein connections to a name server. The default is 53.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-t</option> option sets the maximum time an update request
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein can
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein take before it is aborted. The default is 300 seconds. Zero can be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein used
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein to disable the timeout.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-u</option> option sets the UDP retry interval. The default
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3 seconds. If zero, the interval will be computed from the timeout
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein interval
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein and number of UDP retries.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
b05bdb520d83f7ecaad708fe305268c3420be01dMark Andrews The <option>-r</option> option sets the number of UDP retries. The
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein default is
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3. If zero, only one update request will be made.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-R <replaceable
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein class="parameter">randomdev</replaceable></option> option
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein specifies a source of randomness. If the operating system
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein does not provide a <filename>/dev/random</filename> or
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein equivalent device, the default source of randomness is keyboard
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein input. <filename>randomdev</filename> specifies the name of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein a character device or file containing random data to be used
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein instead of the default. The special value
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <filename>keyboard</filename> indicates that keyboard input
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein should be used. This option may be specified multiple times.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Other types can be entered using "TYPEXXXXX" where "XXXXX" is the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein decimal value of the type with no leading zeros. The rdata,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if present, will be parsed using the UNKNOWN rdata format,
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews (&lt;backslash&gt; &lt;hash&gt; &lt;space&gt; &lt;length&gt;
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein &lt;space&gt; &lt;hexstring&gt;).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein </para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein <para>
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The <option>-T</option> and <option>-P</option> options print out
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein lists of non-meta types for which the type-specific presentation
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein formats are known. <option>-T</option> prints out the list of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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:
-->