nsupdate8 Command

Purpose

Generates a DNS update packet readable by a BIND 8 nameserver.

Syntax

nsupdate8 [ -v ] [ -d ] [Filename]

Description

The nsupdate8 command can read from a file specified on the command line, from stdin for pipes or redirected input from a file, or interactively from a tty. All three methods use the same format specified below. The input defines a DNS update packet that can be used to update a ZONE. There are two sections to an update, a prerequisite section and an update section. The DNS name server verifies that all the prerequisites are true before processing the update section.

Flags

Item Description
-d Causes nsupdate8 to generate additional debug information about its actions.
-v Tells nsupdate8 to use a virtual circuit (TCP connection), instead of the usual UDP connection.

The input format is defined as a set of update packets. Each packet is a set of strings terminated with a newline. The last string in the input stream may end with an EOF. If the stream is to contain multiple update packets, each packet must be separated from the next packet by a blank line (single newline character). The semi-colon is used a comment character. Anything after it is ignored and thrown out of the update packet.

The input format for nsupdate8 is a follows:

section opcode  name [ttl] [class] [type] [data]

This is the general form. Each value of section and opcode modify what is required for later arguments.

Item Description
section Defines the section of the update this record is for. Values are:
prereq
Indicates the record is for the prerequisites section.
 
update
Indicates the record is for the update section.
opcode Defines the operation to do with this record.
Values are:
Prerequisite operations:
nxdomain
Indicates that the name should be checked for non-existance. The ttl must be a non-zero value to indicate for how long it shouldn't exist. An optional class can be specified to restrict the search to only that class. The type of T_ANY is used as a wildcard to match any record type.
nydomain
Indicates that the name should be checked for existance. The ttl must be a non-zero value to indicate for how long the name should continue to exist. An optional class is allowed to restrict the search to only that class. The record type is T_NONE. This forces the check to make sure the name exists.
nxrrset
Indicates that the record of a specific type doesn't exist for the name. An optional class and ttl are allowed to restrict the search. A type is mandatory.
nyrrset
Indicates that the record of a specific type must exist for the name. The ttl and class are optional to restrict the search. The type and data are mandatory. Data may be a wild card. If the data is not a wildcard, it must match the format for the type specified.
Values are:
Update operations:
add
Indicates that the record should be added to the zone. The type and data are mandatory. Wildcards are not allowed as data. The ttl is mandatory and must be non-zero. The class is optional.
delete
Indicates that the record should be deleted from the zone. The type and data are optional. A wildcard is allowed for data. data defaults to the NULL string and type defaults to T_ANY. ttl and class are optional. If ttl is specified, it is reset to 0.
name The name of the DNS entry that one is testing or modifying.
[ttl] Optional time-to-live for the record being added. In some forms, this is not optional.
[class] Class of the record to be added to the zone. Values are IN, HESIOD, and CHAOS. The default for all messages is IN.
[type] The type of the record to be added to or checked against the zone. Values are A, NS, CNAME, SOA, MB, MR, NULL, WKS, PTR, HINFO, MINFO, MX, TXT, RP, AFSDB, X25, ISDN, RT, NSAP, NSAP_PTR, PX, and LOC. NOTE: The CNAME type may only be added with TSIG and TKEY records which are not currently supported in BIND 8.
[data] The data to be added or checked against the zone. The data should be valid for the specified type and in the DOMAIN data file format of a DNS server zone file. For prerequisite checking, an asterik (*) is used to match any value. This can also be used to delete all records of a particular type.

Here are the specific format cases:

prereq nxdomain <name> <ttl != 0> [class]
prereq nydomain <name ttl != 0> [class]
prereq nxrrset <name> [ttl] [class] <type>
prereq nyrrset <name> [ttl] [class] <type> <data>
update delete <name> [ttl] [class] [type] [data]
update add <name> <ttl != 0> [class] <type> <data>

Diagnostics

Messages indicating the different actions done and/or problems encountered by the program.