nsupdate reads input from filename 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.
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 send command) causes the accumulated commands to be sent as one Dynamic DNS update request to the name server.
The command formats and their meaning are as follows:
server {servername} [port]
Sends all dynamic update requests to the name server servername. When no server statement is provided, nsupdate 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. port is the port number on servername where the dynamic update requests get sent. If no port number is specified, the default DNS port number of 53 is used.
local {address} [port]
Sends all dynamic update requests using the local address. When no local statement is provided, nsupdate will send updates using an address and port chosen by the system. port can 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 zone zonename. If no zone statement is provided, nsupdate will attempt determine the correct zone to update based on the rest of the input.
class {classname}
Specify the default class. If no class is specified, the default class is IN.
ttl {seconds}
Specify the default time to live for records to be added. The value none will clear the default ttl.
key {name} {secret}
Specifies that all updates are to be TSIG-signed using the keyname keysecret pair. The key command overrides any key specified on the command line via -y or -k.
gsstsig
Use GSS-TSIG to sign the updated. This is equivalent to specifying -g on the commandline.
oldgsstsig
Use the Windows 2000 version of GSS-TSIG to sign the updated. This is equivalent to specifying -o on the commandline.
realm {[realm_name]}
When using GSS-TSIG use realm_name rather than the default realm in krb5.conf. If no realm is specified the saved realm is cleared.
prereq nxdomain {domain-name}
Requires that no resource record of any type exists with name domain-name.
prereq yxdomain {domain-name}
Requires that domain-name exists (has as at least one resource record, of any type).
prereq nxrrset {domain-name} [class] {type}
Requires that no resource record exists of the specified type, class and domain-name. If class is omitted, IN (internet) is assumed.
prereq yxrrset {domain-name} [class] {type}
This requires that a resource record of the specified type, class and domain-name must exist. If class is omitted, IN (internet) is assumed.
prereq yxrrset {domain-name} [class] {type} {data...}
The data from each set of prerequisites of this form sharing a common type, class, and domain-name 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 type, class, and domain-name. The data are written in the standard text representation of the resource record's RDATA.
update delete {domain-name} [ttl] [class] [type [data...]]
Deletes any resource records named domain-name. If type and data is provided, only matching resource records will be removed. The internet class is assumed if class is not supplied. The ttl is ignored, and is only allowed for compatibility.
update add {domain-name} {ttl} [class] {type} {data...}
Adds a new resource record with the specified ttl, class and data.
show
Displays the current message, containing all of the prerequisites and updates specified since the last send.
send
Sends the current message. This is equivalent to entering a blank line.
answer
Displays the answer.
debug
Turn on debugging.
Lines beginning with a semicolon are comments and are ignored.