Detect FPU by checking CPUID features.
[dragonfly.git] / contrib / bind-9.5.2 / bin / nsupdate / nsupdate.1
1 .\" Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2003 Internet Software Consortium.
3 .\" 
4 .\" Permission to use, copy, modify, and/or distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\" 
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id: nsupdate.1,v 1.1.2.4 2009/07/11 01:43:29 tbox Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: nsupdate
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
23 .\"      Date: Jun 30, 2000
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "NSUPDATE" "1" "Jun 30, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 nsupdate \- Dynamic DNS update utility
34 .SH "SYNOPSIS"
35 .HP 9
36 \fBnsupdate\fR [\fB\-d\fR] [[\fB\-y\ \fR\fB\fI[hmac:]\fR\fIkeyname:secret\fR\fR] | [\fB\-k\ \fR\fB\fIkeyfile\fR\fR]] [\fB\-t\ \fR\fB\fItimeout\fR\fR] [\fB\-u\ \fR\fB\fIudptimeout\fR\fR] [\fB\-r\ \fR\fB\fIudpretries\fR\fR] [\fB\-R\ \fR\fB\fIrandomdev\fR\fR] [\fB\-v\fR] [filename]
37 .SH "DESCRIPTION"
38 .PP
39 \fBnsupdate\fR
40 is used to submit Dynamic DNS Update requests as defined in RFC2136 to a name server. This allows resource records to be added or removed from a zone without manually editing the zone file. A single update request can contain requests to add or remove more than one resource record.
41 .PP
42 Zones that are under dynamic control via
43 \fBnsupdate\fR
44 or a DHCP server should not be edited by hand. Manual edits could conflict with dynamic updates and cause data to be lost.
45 .PP
46 The resource records that are dynamically added or removed with
47 \fBnsupdate\fR
48 have to be in the same zone. Requests are sent to the zone's master server. This is identified by the MNAME field of the zone's SOA record.
49 .PP
50 The
51 \fB\-d\fR
52 option makes
53 \fBnsupdate\fR
54 operate in debug mode. This provides tracing information about the update requests that are made and the replies received from the name server.
55 .PP
56 Transaction signatures can be used to authenticate the Dynamic DNS updates. These use the TSIG resource record type described in RFC2845 or the SIG(0) record described in RFC3535 and RFC2931. TSIG relies on a shared secret that should only be known to
57 \fBnsupdate\fR
58 and the name server. Currently, the only supported encryption algorithm for TSIG is HMAC\-MD5, which is defined in RFC 2104. Once other algorithms are defined for TSIG, applications will need to ensure they select the appropriate algorithm as well as the key when authenticating each other. For instance, suitable
59 \fBkey\fR
60 and
61 \fBserver\fR
62 statements would be added to
63 \fI/etc/named.conf\fR
64 so that the name server can associate the appropriate secret key and algorithm with the IP address of the client application that will be using TSIG authentication. SIG(0) uses public key cryptography. To use a SIG(0) key, the public key must be stored in a KEY record in a zone served by the name server.
65 \fBnsupdate\fR
66 does not read
67 \fI/etc/named.conf\fR.
68 .PP
69 \fBnsupdate\fR
70 uses the
71 \fB\-y\fR
72 or
73 \fB\-k\fR
74 option to provide the shared secret needed to generate a TSIG record for authenticating Dynamic DNS update requests, default type HMAC\-MD5. These options are mutually exclusive. With the
75 \fB\-k\fR
76 option,
77 \fBnsupdate\fR
78 reads the shared secret from the file
79 \fIkeyfile\fR, whose name is of the form
80 \fIK{name}.+157.+{random}.private\fR. For historical reasons, the file
81 \fIK{name}.+157.+{random}.key\fR
82 must also be present. When the
83 \fB\-y\fR
84 option is used, a signature is generated from
85 [\fIhmac:\fR]\fIkeyname:secret.\fR
86 \fIkeyname\fR
87 is the name of the key, and
88 \fIsecret\fR
89 is the base64 encoded shared secret. Use of the
90 \fB\-y\fR
91 option is discouraged because the shared secret is supplied as a command line argument in clear text. This may be visible in the output from
92 \fBps\fR(1)
93 or in a history file maintained by the user's shell.
94 .PP
95 The
96 \fB\-k\fR
97 may also be used to specify a SIG(0) key used to authenticate Dynamic DNS update requests. In this case, the key specified is not an HMAC\-MD5 key.
98 .PP
99 By default,
100 \fBnsupdate\fR
101 uses UDP to send update requests to the name server unless they are too large to fit in a UDP request in which case TCP will be used. The
102 \fB\-v\fR
103 option makes
104 \fBnsupdate\fR
105 use a TCP connection. This may be preferable when a batch of update requests is made.
106 .PP
107 The
108 \fB\-t\fR
109 option sets the maximum time an update request can take before it is aborted. The default is 300 seconds. Zero can be used to disable the timeout.
110 .PP
111 The
112 \fB\-u\fR
113 option sets the UDP retry interval. The default is 3 seconds. If zero, the interval will be computed from the timeout interval and number of UDP retries.
114 .PP
115 The
116 \fB\-r\fR
117 option sets the number of UDP retries. The default is 3. If zero, only one update request will be made.
118 .PP
119 The
120 \fB\-R \fR\fB\fIrandomdev\fR\fR
121 option specifies a source of randomness. If the operating system does not provide a
122 \fI/dev/random\fR
123 or equivalent device, the default source of randomness is keyboard input.
124 \fIrandomdev\fR
125 specifies the name of a character device or file containing random data to be used instead of the default. The special value
126 \fIkeyboard\fR
127 indicates that keyboard input should be used. This option may be specified multiple times.
128 .SH "INPUT FORMAT"
129 .PP
130 \fBnsupdate\fR
131 reads input from
132 \fIfilename\fR
133 or standard input. Each command is supplied on exactly one line of input. Some commands are for administrative purposes. The others are either update instructions or prerequisite checks on the contents of the zone. These checks set conditions that some name or set of resource records (RRset) either exists or is absent from the zone. These conditions must be met if the entire update request is to succeed. Updates will be rejected if the tests for the prerequisite conditions fail.
134 .PP
135 Every update request consists of zero or more prerequisites and zero or more updates. This allows a suitably authenticated update request to proceed if some specified resource records are present or missing from the zone. A blank input line (or the
136 \fBsend\fR
137 command) causes the accumulated commands to be sent as one Dynamic DNS update request to the name server.
138 .PP
139 The command formats and their meaning are as follows:
140 .PP
141 \fBserver\fR {servername} [port]
142 .RS 4
143 Sends all dynamic update requests to the name server
144 \fIservername\fR. When no server statement is provided,
145 \fBnsupdate\fR
146 will send updates to the master server of the correct zone. The MNAME field of that zone's SOA record will identify the master server for that zone.
147 \fIport\fR
148 is the port number on
149 \fIservername\fR
150 where the dynamic update requests get sent. If no port number is specified, the default DNS port number of 53 is used.
151 .RE
152 .PP
153 \fBlocal\fR {address} [port]
154 .RS 4
155 Sends all dynamic update requests using the local
156 \fIaddress\fR. When no local statement is provided,
157 \fBnsupdate\fR
158 will send updates using an address and port chosen by the system.
159 \fIport\fR
160 can additionally be used to make requests come from a specific port. If no port number is specified, the system will assign one.
161 .RE
162 .PP
163 \fBzone\fR {zonename}
164 .RS 4
165 Specifies that all updates are to be made to the zone
166 \fIzonename\fR. If no
167 \fIzone\fR
168 statement is provided,
169 \fBnsupdate\fR
170 will attempt determine the correct zone to update based on the rest of the input.
171 .RE
172 .PP
173 \fBclass\fR {classname}
174 .RS 4
175 Specify the default class. If no
176 \fIclass\fR
177 is specified, the default class is
178 \fIIN\fR.
179 .RE
180 .PP
181 \fBkey\fR {name} {secret}
182 .RS 4
183 Specifies that all updates are to be TSIG\-signed using the
184 \fIkeyname\fR
185 \fIkeysecret\fR
186 pair. The
187 \fBkey\fR
188 command overrides any key specified on the command line via
189 \fB\-y\fR
190 or
191 \fB\-k\fR.
192 .RE
193 .PP
194 \fBprereq nxdomain\fR {domain\-name}
195 .RS 4
196 Requires that no resource record of any type exists with name
197 \fIdomain\-name\fR.
198 .RE
199 .PP
200 \fBprereq yxdomain\fR {domain\-name}
201 .RS 4
202 Requires that
203 \fIdomain\-name\fR
204 exists (has as at least one resource record, of any type).
205 .RE
206 .PP
207 \fBprereq nxrrset\fR {domain\-name} [class] {type}
208 .RS 4
209 Requires that no resource record exists of the specified
210 \fItype\fR,
211 \fIclass\fR
212 and
213 \fIdomain\-name\fR. If
214 \fIclass\fR
215 is omitted, IN (internet) is assumed.
216 .RE
217 .PP
218 \fBprereq yxrrset\fR {domain\-name} [class] {type}
219 .RS 4
220 This requires that a resource record of the specified
221 \fItype\fR,
222 \fIclass\fR
223 and
224 \fIdomain\-name\fR
225 must exist. If
226 \fIclass\fR
227 is omitted, IN (internet) is assumed.
228 .RE
229 .PP
230 \fBprereq yxrrset\fR {domain\-name} [class] {type} {data...}
231 .RS 4
232 The
233 \fIdata\fR
234 from each set of prerequisites of this form sharing a common
235 \fItype\fR,
236 \fIclass\fR, and
237 \fIdomain\-name\fR
238 are combined to form a set of RRs. This set of RRs must exactly match the set of RRs existing in the zone at the given
239 \fItype\fR,
240 \fIclass\fR, and
241 \fIdomain\-name\fR. The
242 \fIdata\fR
243 are written in the standard text representation of the resource record's RDATA.
244 .RE
245 .PP
246 \fBupdate delete\fR {domain\-name} [ttl] [class] [type\ [data...]]
247 .RS 4
248 Deletes any resource records named
249 \fIdomain\-name\fR. If
250 \fItype\fR
251 and
252 \fIdata\fR
253 is provided, only matching resource records will be removed. The internet class is assumed if
254 \fIclass\fR
255 is not supplied. The
256 \fIttl\fR
257 is ignored, and is only allowed for compatibility.
258 .RE
259 .PP
260 \fBupdate add\fR {domain\-name} {ttl} [class] {type} {data...}
261 .RS 4
262 Adds a new resource record with the specified
263 \fIttl\fR,
264 \fIclass\fR
265 and
266 \fIdata\fR.
267 .RE
268 .PP
269 \fBshow\fR
270 .RS 4
271 Displays the current message, containing all of the prerequisites and updates specified since the last send.
272 .RE
273 .PP
274 \fBsend\fR
275 .RS 4
276 Sends the current message. This is equivalent to entering a blank line.
277 .RE
278 .PP
279 \fBanswer\fR
280 .RS 4
281 Displays the answer.
282 .RE
283 .PP
284 Lines beginning with a semicolon are comments and are ignored.
285 .SH "EXAMPLES"
286 .PP
287 The examples below show how
288 \fBnsupdate\fR
289 could be used to insert and delete resource records from the
290 \fBexample.com\fR
291 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
292 \fBexample.com\fR.
293 .sp
294 .RS 4
295 .nf
296 # nsupdate
297 > update delete oldhost.example.com A
298 > update add newhost.example.com 86400 A 172.16.1.1
299 > send
300 .fi
301 .RE
302 .sp
303 .PP
304 Any A records for
305 \fBoldhost.example.com\fR
306 are deleted. And an A record for
307 \fBnewhost.example.com\fR
308 with IP address 172.16.1.1 is added. The newly\-added record has a 1 day TTL (86400 seconds).
309 .sp
310 .RS 4
311 .nf
312 # nsupdate
313 > prereq nxdomain nickname.example.com
314 > update add nickname.example.com 86400 CNAME somehost.example.com
315 > send
316 .fi
317 .RE
318 .sp
319 .PP
320 The prerequisite condition gets the name server to check that there are no resource records of any type for
321 \fBnickname.example.com\fR. 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 the long\-standing rule in RFC1034 that a name must not exist as any other record type if it exists as a CNAME. (The rule has been updated for DNSSEC in RFC2535 to allow CNAMEs to have RRSIG, DNSKEY and NSEC records.)
322 .SH "FILES"
323 .PP
324 \fB/etc/resolv.conf\fR
325 .RS 4
326 used to identify default name server
327 .RE
328 .PP
329 \fBK{name}.+157.+{random}.key\fR
330 .RS 4
331 base\-64 encoding of HMAC\-MD5 key created by
332 \fBdnssec\-keygen\fR(8).
333 .RE
334 .PP
335 \fBK{name}.+157.+{random}.private\fR
336 .RS 4
337 base\-64 encoding of HMAC\-MD5 key created by
338 \fBdnssec\-keygen\fR(8).
339 .RE
340 .SH "SEE ALSO"
341 .PP
342 \fBRFC2136\fR(),
343 \fBRFC3007\fR(),
344 \fBRFC2104\fR(),
345 \fBRFC2845\fR(),
346 \fBRFC1034\fR(),
347 \fBRFC2535\fR(),
348 \fBRFC2931\fR(),
349 \fBnamed\fR(8),
350 \fBdnssec\-keygen\fR(8).
351 .SH "BUGS"
352 .PP
353 The TSIG key is redundantly stored in two separate files. This is a consequence of nsupdate using the DST library for its cryptographic operations, and may change in future releases.
354 .SH "COPYRIGHT"
355 Copyright \(co 2004\-2009 Internet Systems Consortium, Inc. ("ISC")
356 .br
357 Copyright \(co 2000\-2003 Internet Software Consortium.
358 .br