
NSUPDATE(8)             FreeBSD System Manager's Manual            NSUPDATE(8)

NNAAMMEE
     nnssuuppddaattee - update Internet name servers interactively

SSYYNNOOPPSSIISS
     nnssuuppddaattee [--_k _k_e_y_d_i_r_:_k_e_y_n_a_m_e] [--_d] [--_v] [_f_i_l_e_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
     NNssuuppddaattee is a program to update Internet domain name servers supporting
     dynamic update.  NNssuuppddaattee uses the DNS resolver library to pass messages
     to a DNS server requesting the additional or deletion of DNS resource
     records (RRs).  NNssuuppddaattee reads input from _f_i_l_e_n_a_m_e or standard input.

AARRGGUUMMEENNTTSS
     --kk          Sign updates with TSIG.

     --dd          Debug mode.

     --vv          Virtual circuit - use TCP to communication with server.  De-
                 fault is UDP.

IINNPPUUTT FFOORRMMAATT
     NNssuuppddaattee reads input records, one per line, each line contributing a re-
     source record to an update request.  All domain names used in a single
     update request must belong to the same DNS zone.  Updates are sent to the
     master server as defined in the SOA MNAME field.  A blank line causes the
     accumulated records to be formated into a single update request and
     transmitted to the zone's authoritative name servers.  Additional records
     may follow, which are formed into additional, completely independent up-
     date requests.  For the last request to be transmitted, a blank line must
     end the input.

     Records take one of two general forms.  _P_r_e_r_e_q_u_i_s_i_t_e records specify con-
     ditions that must be satisfied before the request will be processed.
     _U_p_d_a_t_e records specify changes to be made to the DNS database.  A update
     request consists of zero or more prerequisites and one or more updates.
     Each update request is processed atomically - all prerequisites must be
     satisfied, then all updates will be performed.

     NNssuuppddaattee understands the following input record formats:

     pprreerreeqq nnxxddoommaaiinn _d_o_m_a_i_n_-_n_a_m_e Requires that no RR of any type exists with
             name _d_o_m_a_i_n_-_n_a_m_e.


     pprreerreeqq yyxxddoommaaiinn _d_o_m_a_i_n_-_n_a_m_e Requires that at least one RR named _d_o_m_a_i_n_-
             _n_a_m_e must exist.


     pprreerreeqq nnxxrrrrsseett _d_o_m_a_i_n_-_n_a_m_e [class] _t_y_p_e Requires that no RR exists of the
             specified _t_y_p_e and _d_o_m_a_i_n_-_n_a_m_e.


     pprreerreeqq yyxxrrrrsseett _d_o_m_a_i_n_-_n_a_m_e [class] _t_y_p_e [data...] Requires that a RR ex-
             ists of the specified _t_y_p_e and _d_o_m_a_i_n_-_n_a_m_e. If _d_a_t_a is specified,
             it must match exactly.


     uuppddaattee ddeelleettee _d_o_m_a_i_n_-_n_a_m_e [class] [type [data...]] Deletes RRs named
             _d_o_m_a_i_n_-_n_a_m_e. If _t_y_p_e (and possibly _d_a_t_a) is specified, only
             matching records will be deleted.



     uuppddaattee aadddd _d_o_m_a_i_n_-_n_a_m_e _t_t_l [class] _t_y_p_e _d_a_t_a_._._. Adds a new RR with speci-
             fied _t_t_l, _t_y_p_e, and _d_a_t_a.



EEXXAAMMPPLLEESS
     The following example illustrates the interactive use of nnssuuppddaattee to
     change an IP address by deleting any existing A records for a domain name
     and then inserting a new one.  Since no prerequisites are specified, the
     new record will be added even if there were no existing records to
     delete.  Note the trailing blank line, required to process the request.

           $ nsupdate
           > update delete test.example.com A
           > update add test.example.com 3600 A 10.1.1.1
           >


     In this example, a CNAME alias is added to the database only if there are
     no existing A or CNAME records for the domain name.

           $ nsupdate
           > prereq nxrrset www.example.com A
           > prereq nxrrset www.example.com CNAME
           > update add www.example.com 3600 CNAME test.example.com
           >


     In this example, the nsupdate will be signed with the key "mykey", which
     is in the directory "/var/named/keys".

           $ nsupdate -k /var/named/keys:mykey
           > update add ftp.example.com 60 A 192.168.5.1
           >



DDIIAAGGNNOOSSTTIICCSS
     "send error" Typically indicates that the authoritative nameservers could
             not be reached


     "failed update packet" Typically indicates that the nameserver has re-
             jected the update, either because the nameserver doesn't support
             dynamic update, or due to an authentication failure


     "res_mkupdate: packet size = _s_i_z_e" (and no other messages) The update was
             successfully received and authenticated by the nameserver.  The
             prerequisites, however, may have prevented the update from actu-
             ally being performed.  The only way to determine if the update
             was performed is to use debug mode (--dd) and examine the status
             field in the nameserver's reply.

FFIILLEESS
     /etc/resolv.conf
     initial domain name and name server addresses

SSEEEE AALLSSOO
     named(8),  resolver(3),  resolver(5);  RFC-1034, ``Domain Names -
     Concepts and Facilities''; RFC-1035, ``Domain Names - Implementation and
     Specification''; RFC-2136, Dynamic Updates in the Domain Name System.

AAUUTTHHOORR
     Brent Baccala

