nsupdate.docbook revision e903df2f012869e36251e9a76b13a9aa228fb1ac
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - Copyright (C) 2001, 2002 Internet Software Consortium.
f9aef05653eeb454c489d5bd2bde6daab774ad4aTinderbox User - Permission to use, copy, modify, and distribute this software for any
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - purpose with or without fee is hereby granted, provided that the above
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - copyright notice and this permission notice appear in all copies.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<!-- $Id: nsupdate.docbook,v 1.12 2002/11/12 23:58:13 explorer Exp $ -->
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<refentryinfo>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</refentryinfo>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<refpurpose>Dynamic DNS update utility</refpurpose>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</refnamediv>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<refsynopsisdiv>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt <arg><option>-y <replaceable class="parameter">keyname:secret</replaceable></option></arg>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt</cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</refsynopsisdiv>
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntis used to submit Dynamic DNS Update requests as defined in RFC2136
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntto a name server.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis allows resource records to be added or removed from a zone
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntwithout manually editing the zone file.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntA single update request can contain requests to add or remove more than one
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntresource record.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntZones that are under dynamic control via
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntor a DHCP server should not be edited by hand.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntManual edits could
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntconflict with dynamic updates and cause data to be lost.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThe resource records that are dynamically added or removed with
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunthave to be in the same zone.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntRequests are sent to the zone's master server.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis is identified by the MNAME field of the zone's SOA record.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntoperate in debug mode.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis provides tracing information about the update requests that are
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntmade and the replies received from the name server.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntTransaction signatures can be used to authenticate the Dynamic DNS
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThese use the TSIG resource record type described in RFC2845 or the
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntSIG(0) record described in RFC3535 and RFC2931.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntTSIG relies on a shared secret that should only be known to
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCurrently, the only supported encryption algorithm for TSIG is
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntHMAC-MD5, which is defined in RFC 2104.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntOnce other algorithms are defined for TSIG, applications will need to
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntensure they select the appropriate algorithm as well as the key when
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntauthenticating each other.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntFor instance suitable
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntstatements would be added to
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntso that the name server can associate the appropriate secret key
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntand algorithm with the IP address of the
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntclient application that will be using TSIG authentication.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntSIG(0) uses public key cryptography. To use a SIG(0) key, the public
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntkey must be stored in a KEY record in a zone served by the name server.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntdoes not read
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntoption (with an HMAC-MD5 key) to provide the shared secret needed to generate
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunta TSIG record for authenticating Dynamic DNS update requests.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntThese options are mutually exclusive.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntreads the shared secret from the file
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntwhose name is of the form
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt<filename>K{name}.+157.+{random}.private</filename>.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntFor historical
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntreasons, the file
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntmust also be present. When the
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntoption is used, a signature is generated from
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntis the name of the key,
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntis the base64 encoded shared secret.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntoption is discouraged because the shared secret is supplied as a command
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntline argument in clear text.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis may be visible in the output from
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<citerefentry>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</citerefentry>
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntor in a history file maintained by the user's shell.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThe <option>-k</option> may also be used to specify a SIG(0) key used
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntto authenticate Dynamic DNS update requests. In this case, the key
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntspecified is not an HMAC-MD5 key.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntuses UDP to send update requests to the name server unless they are too
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntlarge to fit in a UDP request in which case TCP will be used.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntuse a TCP connection.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis may be preferable when a batch of update requests is made.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<para>The <option>-t</option> option sets the maximum time a update request can
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunttake before it is aborted. The default is 300 seconds. Zero can be used
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntto disable the timeout.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<para>The <option>-u</option> option sets the UDP retry interval. The default is
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt3 seconds. If zero the interval will be computed from the timeout interval
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntand number of UDP retries.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<para>The <option>-r</option> option sets the number of UDP retries. The default is
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt3. If zero only one update request will be made.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntreads input from
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntor standard input.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntEach command is supplied on exactly one line of input.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntSome commands are for administrative purposes.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThe others are either update instructions or prerequisite checks on the
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntcontents of the zone.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThese checks set conditions that some name or set of
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntresource records (RRset) either exists or is absent from the zone.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThese conditions must be met if the entire update request is to succeed.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntUpdates will be rejected if the tests for the prerequisite conditions fail.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntEvery update request consists of zero or more prerequisites
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntand zero or more updates.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThis allows a suitably authenticated update request to proceed if some
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntspecified resource records are present or missing from the zone.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntA blank input line (or the <command>send</command> command) causes the
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntaccumulated commands to be sent as one Dynamic DNS update request to the
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntThe command formats and their meaning are as follows:
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt<variablelist>
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt<cmdsynopsis>
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt</cmdsynopsis>
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntSends all dynamic update requests to the name server
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntWhen no server statement is provided,
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntwill send updates to the master server of the correct zone.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntThe MNAME field of that zone's SOA record will identify the master
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntserver for that zone.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntis the port number on
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Huntwhere the dynamic update requests get sent.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntIf no port number is specified, the default DNS port number of 53 is
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntSends all dynamic update requests using the local
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntWhen no local statement is provided,
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntwill send updates using an address and port choosen by the system.
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntcan additionally be used to make requests come from a specific port.
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntIf no port number is specified, the system will assign one.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt<cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt</cmdsynopsis>
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntSpecifies that all updates are to be made to the zone
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntstatement is provided,
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntwill attempt determine the correct zone to update based on the rest of the input.
> update delete oldhost.example.com A
> update add newhost.example.com 86400 A 172.16.1.1
> prereq nxdomain nickname.example.com