HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
n
nsupdate(1) nsupdate(1)
prereq yxdomain domain-name
Requires that domain-name exists (has 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 (resource records). 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 class type data...
Deletes any resource records named domain-name.Iftype and data are provided,
only matching resource records will be removed. The Internet class (IN) is assumed if
class is not supplied.
update add domain-name ttl class type data..
Adds a new resource record named domain-name with the specified ttl, class and
data.
EXAMPLES
The examples below show how
nsupdate could be used to insert and delete resource records from the
example.com 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 example.com
.
# nsupdate
> update add newhost.example.com 86400 A 172.16.1.1
>
A record for newhost.example.com
with IP address 172.16.1.1 is added. The newly-added record has
a 1 day TTL (86400 seconds)
# nsupdate
> update delete newhost.example.com
>
A record for newhost.example.com
is deleted.
# nsupdate
> prereq nxdomain nickname.example.com
> update add nickname.example.com 640 CNAME somehost.example.com.
>
The prerequisite condition gets the name server to check that there are no resource records of any type for
nickname.example.com. 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 record is added, it cannot conflict with the
long-standing rule in RFC1034 that a name must not exist as any other record type if it exists as a
CNAME.
Example of use of nsupdate in the non-interactive mode:
# nsupdate nsupd.txt
where nsupd.txt contains the following information followed by a blank line:
update add newhost.example.com 86400 A 172.16.1.1
FILES
/etc/resolv.conf used to identify default name server.
Section 1−−666 Hewlett-Packard Company − 2 − HP-UX 11i Version 1: September 2005