📄 nsupdate.docbook
字号:
</varlistentry><varlistentry><term><cmdsynopsis><command>prereq yxdomain</command><arg choice="req">domain-name</arg></cmdsynopsis></term><listitem><para>Requires that<parameter>domain-name</parameter>exists (has as at least one resource record, of any type).</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>prereq nxrrset</command><arg choice="req">domain-name</arg><arg choice="opt">class</arg><arg choice="req">type</arg></cmdsynopsis></term><listitem><para>Requires that no resource record exists of the specified<parameter>type</parameter>,<parameter>class</parameter>and<parameter>domain-name</parameter>.If<parameter>class</parameter>is omitted, IN (internet) is assumed.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>prereq yxrrset</command><arg choice="req">domain-name</arg><arg choice="opt">class</arg><arg choice="req">type</arg></cmdsynopsis></term><listitem><para>This requires that a resource record of the specified<parameter>type</parameter>,<parameter>class</parameter>and<parameter>domain-name</parameter>must exist.If<parameter>class</parameter>is omitted, IN (internet) is assumed.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>prereq yxrrset</command><arg choice="req">domain-name</arg><arg choice="opt">class</arg><arg choice="req">type</arg><arg choice="req" rep="repeat">data</arg></cmdsynopsis></term><listitem><para>The<parameter>data</parameter>from each set of prerequisites of this formsharing a common<parameter>type</parameter>,<parameter>class</parameter>,and <parameter>domain-name</parameter>are combined to form a set of RRs. This set of RRs mustexactly match the set of RRs existing in the zone at thegiven <parameter>type</parameter>,<parameter>class</parameter>,and <parameter>domain-name</parameter>.The<parameter>data</parameter>are written in the standard text representation of the resource record'sRDATA.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>update delete</command><arg choice="req">domain-name</arg><arg choice="opt">ttl</arg><arg choice="opt">class</arg><arg choice="opt">type <arg choice="opt" rep="repeat">data</arg></arg></cmdsynopsis></term><listitem><para>Deletes any resource records named<parameter>domain-name</parameter>.If<parameter>type</parameter>and<parameter>data</parameter>is provided, only matching resource records will be removed.The internet class is assumed if<parameter>class</parameter>is not supplied. The<parameter>ttl</parameter>is ignored, and is only allowed for compatibility.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>update add</command><arg choice="req">domain-name</arg><arg choice="req">ttl</arg><arg choice="opt">class</arg><arg choice="req">type</arg><arg choice="req" rep="repeat">data</arg></cmdsynopsis></term><listitem><para>Adds a new resource record with the specified<parameter>ttl</parameter>,<parameter>class</parameter>and<parameter>data</parameter>.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>show</command></cmdsynopsis></term><listitem><para>Displays the current message, containing all of the prerequisites andupdates specified since the last send.</para></listitem></varlistentry><varlistentry><term><cmdsynopsis><command>send</command></cmdsynopsis></term><listitem><para>Sends the current message. This is equivalent to entering a blank line.</para></listitem><varlistentry><term><cmdsynopsis><command>answer</command></cmdsynopsis></term><listitem><para>Displays the answer.</para></listitem></variablelist><para>Lines beginning with a semicolon are comments and are ignored.</para></refsect1><refsect1><title>EXAMPLES</title><para>The examples below show how<command>nsupdate</command>could be used to insert and delete resource records from the<type>example.com</type>zone.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 for<type>example.com</type>.<programlisting># nsupdate> update delete oldhost.example.com A> update add newhost.example.com 86400 A 172.16.1.1> send</programlisting></para><para>Any A records for<type>oldhost.example.com</type>are deleted.and an A record for<type>newhost.example.com</type>it IP address 172.16.1.1 is added.The newly-added record has a 1 day TTL (86400 seconds)<programlisting># nsupdate> prereq nxdomain nickname.example.com> update add nickname.example.com 86400 CNAME somehost.example.com> send</programlisting></para><para>The prerequisite condition gets the name server to check that thereare no resource records of any type for<type>nickname.example.com</type>.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 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 haveRRSIG, DNSKEY and NSEC records.)</para></refsect1><refsect1><title>FILES</title><variablelist><varlistentry><term><constant>/etc/resolv.conf</constant></term><listitem><para>used to identify default name server</para></listitem><varlistentry><term><constant>K{name}.+157.+{random}.key</constant></term><listitem><para>base-64 encoding of HMAC-MD5 key created by<citerefentry><refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem><varlistentry><term><constant>K{name}.+157.+{random}.private</constant></term><listitem><para>base-64 encoding of HMAC-MD5 key created by<citerefentry><refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para></listitem></variablelist></refsect1><refsect1><title>SEE ALSO</title><para><citerefentry><refentrytitle>RFC2136</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC3007</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC2104</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC2845</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC1034</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC2535</refentrytitle></citerefentry>,<citerefentry><refentrytitle>RFC2931</refentrytitle></citerefentry>,<citerefentry><refentrytitle>named</refentrytitle><manvolnum>8</manvolnum></citerefentry>,<citerefentry><refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</refsect1><refsect1><title>BUGS</title><para>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.</para></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -