MAN page from Mandrake 9.X bind-utils-9.2.3-0.rc2.1mdk.i586.rpm


Section: (8)
Updated: Jun 30, 2000


nsupdate - Dynamic DNS update utility 


nsupdate [ -d ] [ [ -y keyname:secret ] [ -k keyfile ] ] [ -v ] [ filename ]  


nsupdateis used to submit Dynamic DNS Update requests as defined in RFC2136to a name server.This allows resource records to be added or removed from a zonewithout manually editing the zone file.A single update request can contain requests to add or remove more than oneresource record.

Zones that are under dynamic control viansupdateor a DHCP server should not be edited by hand.Manual edits couldconflict with dynamic updates and cause data to be lost.

The resource records that are dynamically added or removed withnsupdatehave to be in the same zone.Requests are sent to the zone's master server.This is identified by the MNAME field of the zone's SOA record.

The-doption makesnsupdateoperate in debug mode.This provides tracing information about the update requests that aremade and the replies received from the name server.

Transaction signatures can be used to authenticate the Dynamic DNSupdates.These use the TSIG resource record type described in RFC2845.The signatures rely on a shared secret that should only be known tonsupdateand the name server.Currently, the only supported encryption algorithm for TSIG isHMAC-MD5, which is defined in RFC 2104.Once other algorithms are defined for TSIG, applications will need toensure they select the appropriate algorithm as well as the key whenauthenticating each other.For instance suitablekeyandserverstatements would be added to/etc/named.confso that the name server can associate the appropriate secret keyand algorithm with the IP address of theclient application that will be using TSIG authentication.nsupdatedoes not read/etc/named.conf.

nsupdateuses the-yor-koption to provide the shared secret needed to generate a TSIG recordfor authenticating Dynamic DNS update requests.These options are mutually exclusive.With the-koption,nsupdatereads the shared secret from the filekeyfile,whose name is of the form K{name}.+157.+{random}.private.For historicalreasons, the file K{name}.+157.+{random}.keymust also be present. When the-yoption is used, a signature is generated fromkeyname:secret.keynameis the name of the key,andsecretis the base64 encoded shared secret.Use of the-yoption is discouraged because the shared secret is supplied as a commandline argument in clear text.This may be visible in the output fromps(1)or in a history file maintained by the user's shell.

By defaultnsupdateuses UDP to send update requests to the name server.The-voption makesnsupdateuse a TCP connection.This may be preferable when a batch of update requests is made. 


nsupdatereads input fromfilenameor 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 thecontents of the zone.These checks set conditions that some name or set ofresource 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.

Every update request consists of zero or more prerequisitesand zero or more updates.This allows a suitably authenticated update request to proceed if somespecified resource records are present or missing from the zone.A blank input line (or the send command) causes theaccumulated commands to be sent as one Dynamic DNS update request to thename server.

The command formats and their meaning are as follows:

server servername [ port ]
Sends all dynamic update requests to the name serverservername.When no server statement is provided,nsupdatewill send updates to the master server of the correct zone.The MNAME field of that zone's SOA record will identify the masterserver for that zone.portis the port number onservernamewhere the dynamic update requests get sent.If no port number is specified, the default DNS port number of 53 isused.
local address [ port ]
Sends all dynamic update requests using the localaddress.When no local statement is provided,nsupdatewill send updates using an address and port chosen by the system.portcan additionally be used to make requests come from a specific port.If no port number is specified, the system will assign one.
zone zonename
Specifies that all updates are to be made to the zonezonename.If nozonestatement is provided,nsupdatewill attempt determine the correct zone to update based on the rest of the input.
key name secret
Specifies that all updates are to be TSIG signed using thekeyname keysecret pair.The key commandoverrides any key specified on the command line via-y or -k.
prereq nxdomain domain-name
Requires that no resource record of any type exists with namedomain-name.
prereq yxdomain domain-name
Requires thatdomain-nameexists (has as at least one resource record, of any type).
prereq nxrrset domain-name [ class ] type
Requires that no resource record exists of the specifiedtype,classanddomain-name.Ifclassis omitted, IN (internet) is assumed.
prereq yxrrset domain-name [ class ] type
This requires that a resource record of the specifiedtype,classanddomain-namemust exist.Ifclassis omitted, IN (internet) is assumed.
prereq yxrrset domain-name [ class ] type data...
Thedatafrom each set of prerequisites of this formsharing a commontype,class,and domain-nameare combined to form a set of RRs. This set of RRs mustexactly match the set of RRs existing in the zone at thegiven type,class,and domain-name.Thedataare written in the standard text representation of the resource record'sRDATA.
update delete domain-name [ ttl ] [ class ] [ type [ data... ] ]
Deletes any resource records nameddomain-name.Iftypeanddatais provided, only matching resource records will be removed.The internet class is assumed ifclassis not supplied. Thettlis ignored, and is only allowed for compatibility.
update add domain-name ttl [ class ] type data...
Adds a new resource record with the specifiedttl,classanddata.
Displays the current message, containing all of the prerequisites andupdates specified since the last send.
Sends the current message. This is equivalent to entering a blank line.

Lines beginning with a semicolon are comments, and are ignored. 


The examples below show hownsupdatecould be used to insert and delete resource records from theexample.comzone.Notice that the input in each example contains a trailing blank line so thata group of commands are sent as one dynamic update request to themaster name server

# nsupdate> update delete A> update add 86400 A>

Any A records foroldhost.example.comare deleted.and an A record fornewhost.example.comit IP address is added.The newly-added record has a 1 day TTL (86400 seconds)

# nsupdate> prereq nxdomain> update add 86400 CNAME>

The prerequisite condition gets the name server to check that thereare no resource records of any type 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 thelong-standing rule in RFC1034 that a name must not exist as any otherrecord type if it exists as a CNAME.(The rule has been updated for DNSSEC in RFC2535 to allow CNAMEs to haveSIG, KEY and NXT records.) 


used to identify default name server
base-64 encoding of HMAC-MD5 key created bydnssec-keygen(8).
base-64 encoding of HMAC-MD5 key created bydnssec-keygen(8).




The TSIG key is redundantly stored in two separate files.This is a consequence of nsupdate using the DST libraryfor its cryptographic operations, and may change in futurereleases.




This document was created byman2html,using the manual pages.