請教各位前輩
我想要更新動態DNS的MX紀錄,
但是範例 "prereq" 這是怎樣的功能?
prereq yxrrset domain name type [rdata]
Makes the existence of an RRset of type type owned by domain name
a prerequisite to performing the update
prereq nxrrset
Makes the non-existence of an RRset of type type owned by domain
name a prerequisite to performing the update specified in successive
update commands
prereq yxdomain domain name
Makes the existence of the domain name specified a prerequisite to
performing the update
prereq nxdomain
Makes the non-existence of the domain name specified a prerequisite
to performing the update
update delete domain name [type] [rdata]
Deletes the domain name specified or, if type is also specified,
deletes the RRset specified or, if rdata is also specified, deletes the
record matching domain name, type, and rdata
update add domain name ttl [class] type rdata
Adds the record specified to the zone. Note that the TTL, in addition to
the type and resource-record-specific data, must be included, but the
class is optional, and defaults to IN
So, for example, the command:
% nsupdate
> prereq nxdomain dakota.west.acmebw.com.
> update add dakota.west.acmebw.com. 333 in a 192.168.0.4
>
tells the server to add an address for dakota.west.acmebw.com only if the domain name does not already exist. Note that the last blank line is nsupdate's cue to send the update.
The command:
% nsupdate
> prereq yxrrset dakota.west.acmebw.com. in mx
> update delete dakota.west.acmebw.com. in mx
> update add dakota.west.acmebw.com. in mx 10 dakota.west.acmebw.com.
> update add dakota.west.acmebw.com. in mx 50 store-forward.mindspring.com.
>
http://216.239.35.100/search?q=cache:4YDGbbswAtgC:hr.uoregon.edu/davidrl/misc/NetworkingBookshelf/dnsbind/ch10_03.htm+nsupdate+,+mx&hl=zh-TW&ie=UTF-8