~ubuntu-branches/ubuntu/saucy/maradns/saucy

« back to all changes in this revision

Viewing changes to doc/en/text/man.csv2.txt

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2006-10-09 17:44:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061009174421-yb151elg3m4t5shl
Tags: 1.2.12.03-1
* New upstream release with many new doc tweaks. Though most of the changes
  are with the webpages which I have chosen not to distribute as you can
  read them all rather online at http://maradns.org/
* The diffs in the Makefiles are due to upstream's configure script
* Added bind2csv2.py as an example from upstream's tools/
  There is a lot of little scripts in tools/ which can probably join this

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
   data for this record; the format for the rdata is type-specific.
26
26
 
27
27
   Anything in square brackets is an optional field. If the ttl is not
28
 
   specified, the ttl is set to be 86400 seconds long (one day). If the rtype
29
 
   is not specified, it is set to be an "A" (ipv4 address) record.
 
28
   specified, the ttl is set to the default ttl value (see "Default TTL"
 
29
   below). If the rtype is not specified, it is set to be an "A" (ipv4
 
30
   address) record.
30
31
 
31
32
   The zone file supports comments; comments are specified by having a '#'
32
33
   anywhere between fields or records; when a '#' is seen, the csv2 parser
85
86
   Priority, weight, port, and target. For more information, please refer to
86
87
   RFC 2782. Example:
87
88
 
88
 
 _http._tcp.% srv 0 0 80 a.%
 
89
 _http._tcp.% SRV 0 0 80 a.%
89
90
 
90
91
NS
91
92
 
114
115
 
115
116
 x.org. SOA x.org. email@x.org. 1 7200 3600 604800 1800
116
117
 
 
118
   The serial numeric field may be replaced by the string '/serial'; this
 
119
   string tells the CSV2 zone parser to synthesize a serial number for the
 
120
   zone based on the timestamp for the zone file. This allows one to have the
 
121
   serial number be automatically updated whenever the zone file is edited.
 
122
   Here is how this special field looks in a SOA record:
 
123
 
 
124
 x.org. SOA x.org. email@x.org. /serial 7200 3600 604800 1800
 
125
 
 
126
   The '/serial' string is case-sensitive; only '/serial' in all lower case
 
127
   will parse.
 
128
 
117
129
TXT
118
130
 
119
131
   A TXT record stores arbitrary text and/or binary data for a given host
167
179
   following is one way of setting up the reverse DNS lookup for
168
180
   x.example.net:
169
181
 
170
 
 x.example.net. A 10.2.28.79
 
182
 x.example.net. A 10.3.28.79
171
183
 79.28.3.10.in-addr.arpa. PTR x.example.net.
172
184
 
173
185
   But the above two lines in a zone file can also be represented thusly:
174
186
 
175
 
 x.example.net. FQDN4 10.2.28.79
 
187
 x.example.net. FQDN4 10.3.28.79
176
188
 
177
189
   Note that the csv2 parser does not bother to check that any given IP only
178
190
   has a single FQDN4 record; it is up to the DNS administrator to ensure
193
205
   host name, this is considered bad practice and is not compatible with some
194
206
   other DNS servers.
195
207
 
196
 
   CNAME records are not permitted in a csv2_default_zonefile.
 
208
   CNAME records are not permitted in a csv2_default_zonefile. If you do not
 
209
   know what a csv2_default_zonefile is, this fact is of no relevance.
 
210
 
 
211
                    Historical and uncommon resource records
 
212
 
 
213
   The following resource records are mainly of historical interest, or are
 
214
   not commonly used.
 
215
 
 
216
HINFO
 
217
 
 
218
   An HINFO record is a description of the CPU (processor) and OS that a
 
219
   given host is using. The format for this record is identical to a TXT
 
220
   record, except that the field must have precisely two chunks.
 
221
 
 
222
   The first chunk of a HINFO record is the CPU the host is running; the
 
223
   second chunk is the OS the host is running.
 
224
 
 
225
   Example:
 
226
 
 
227
 example.com. HINFO 'Intel Pentium III';'CentOS Linux 3.7'
 
228
 
 
229
   This resource record is not actively used--the IANA has a list of CPUs and
 
230
   OSes that this record is supposed to have. However, this list has not been
 
231
   updated since 2002.
 
232
 
 
233
WKS
 
234
 
 
235
   WKS records are historical records which have been superseded by SRV
 
236
   records. The format of the record is an IP, followed by a protocol number
 
237
   (6 means TCP), followed by a list of ports that a given server has
 
238
   available for services.
 
239
 
 
240
   For example, to advertise that example.net has the IP 10.1.2.3, and has a
 
241
   SSH, HTTP (web), and NNTP server:
 
242
 
 
243
 example.net. WKS 10.1.2.3 6 22,80,119
 
244
 
 
245
   MaraDNS only allows up to 10 different port numbers in a WKS record, and
 
246
   requires that the listed port numbers are not be higher than 1023.
 
247
 
 
248
MD and MF
 
249
 
 
250
   MD and MF records are RR types that existed before MX records, and were
 
251
   made obsolete by MX records. RFC1035 says that a DNS server can either
 
252
   reject these records or convert these records in to MX records. BIND
 
253
   rejects these records; MaraDNS converts them.
 
254
 
 
255
   Example:
 
256
 
 
257
 example.net. MD a.example.net.
 
258
 example.net. MF b.example.net.
 
259
 
 
260
   Is equivalent to:
 
261
 
 
262
 example.net. MX 0 a.example.net.
 
263
 example.net. MX 10 b.example.net.
 
264
 
 
265
MB, MG, MINFO, and MR
 
266
 
 
267
   In the late 1980s, an alternative to MX records was proposed. This
 
268
   alternative utilized MB, MG, MINFO, and MR records. This alternative
 
269
   failed to gather popularity. However, these records were codified in
 
270
   RFC1035, and are supported by MaraDNS. Here is what the records look like:
 
271
 
 
272
 example.net. MB mail.example.net.
 
273
 example.net. MG mg@example.net.
 
274
 example.net. MINFO rm@example.net. re@example.net.
 
275
 example.net. MR mr@example.net.
 
276
 
 
277
   More information about these records can be found in RFC1035.
 
278
 
 
279
AFSDB, RP, X25, ISDN, and RT
 
280
 
 
281
   AFSDB, RP, X25, ISDN, and RT are resource records which were proposed in
 
282
   RFC1183. None of these resource records are widely used.
 
283
 
 
284
   With the exception of the ISDN record, the format of these records is
 
285
   identical to the examples in RFC1183. The format of the ISDN record is
 
286
   identical unless the record has a subaddress (SA). If an ISDN record has a
 
287
   subaddress, it is separated from the ISDN-address by a ';' instead of
 
288
   whitespace.
 
289
 
 
290
   If used, here is how the records would look in a csv2 zone file:
 
291
 
 
292
 example.net. AFSDB 1 afsdb.example.net.
 
293
 example.net. RP rp@example.net. rp.example.net.
 
294
 example.net. RP rp2@example.net. .
 
295
 example.net. X25 311061700956
 
296
 example.net. ISDN 150862028003217
 
297
 example.net. ISDN 150862028003217;004
 
298
 example.net. RT 10 relay.example.net.
 
299
 
 
300
NSAP and NSAP-PTR
 
301
 
 
302
   NSAP and NSAP-PTR records were proposed in RFC1706. A NSAP record is a
 
303
   hexadecimal number preceeded by the string "0x" and with optional dots
 
304
   between bytes. This hexadecimal number is converted in to a binary number
 
305
   by MaraDNS. A NSAP-PTR record is idenical to a PTR record, but has a
 
306
   different RTYPE.
 
307
 
 
308
   More information about these records can be obtained from RFC1706.
 
309
 
 
310
   If used, here is how the records would look in a csv2 zone file:
 
311
 
 
312
 example.net. NSAP 0x47.0005.80.005a00.0000.0001.e133.ffffff000162.00
 
313
 example.net. NSAP-PTR nsap.example.net.
 
314
 
 
315
PX
 
316
 
 
317
   The PX RR is an obscure RR described in RFC2163. A PX record looks like
 
318
   this in a CSV2 zone file:
 
319
 
 
320
 example.net. PX 15 px1.example.net. px2.example.net.
 
321
 
 
322
GPOS
 
323
 
 
324
   An GPOS record is a description of the location of a given server. The
 
325
   format for this record is identical to a TXT record, except that the field
 
326
   must have precisely three chunks.
 
327
 
 
328
   The first chunk of a GPOS record is the longitude; the second chunk is the
 
329
   latitude; the third chunk is the altitude (in meters).
 
330
 
 
331
   Example:
 
332
 
 
333
 example.net. GPOS '-98.6502';'19.283';'2134'
 
334
 
 
335
   More information about this record can be found in RFC1712.
 
336
 
 
337
   This resource record is not actively used; for the relatively few people
 
338
   who encode their position in DNS, the LOC record is far more common.
 
339
 
 
340
LOC
 
341
 
 
342
   The LOC recource record is an uncommonly used resource record that
 
343
   describes the position of a given server. LOC records are described in
 
344
   RFC1876.
 
345
 
 
346
   Note that MaraDNS' LOC parser assumes that the altitude, size, horizontal,
 
347
   and vertical precision numbers are always expressed in meters. Also note
 
348
   that that sub-meter values for size, horizontal, and vertical precision
 
349
   are not allowed. Additionally, the altitude can not be greater than
 
350
   21374836.47 meters.
 
351
 
 
352
   Example:
 
353
 
 
354
 example.net. LOC 19 31 2.123 N 98 3 4 W 2000m 2m 4m 567m
 
355
 
 
356
                                 SLASH COMMANDS
 
357
 
 
358
   In addition to being able to have resource records and comments, csv2 zone
 
359
   files can also have special slash commands. These slash commands, with the
 
360
   exception of the '/serial' slash command (see "SOA" above), can only be
 
361
   placed where the name for a record would be placed. Note that slash
 
362
   commands are case-sensitive, and the command in question must be in
 
363
   all-lower-case.
 
364
 
 
365
   These commands are as follows:
 
366
 
 
367
Default TTL
 
368
 
 
369
   The default TTL is the TTL for a resource record without a TTL specified.
 
370
   This can be changed with the '/ttl' slash command. This command takes only
 
371
   a single argument: The time, in seconds, for the new default TTL. The
 
372
   '/ttl' slash command only affects the TTL of records that follow the
 
373
   command. A zone file can have multiple '/ttl' slash commands.
 
374
 
 
375
   The default TTL is 86400 seconds (one day) until changed by the '/ttl'
 
376
   slash command.
 
377
 
 
378
   In the following example, a.ttl.example.com will have a TTL of 86400
 
379
   seconds (as long as the zone file with this record has not previously used
 
380
   the '/ttl' slash command), b.ttl.example.com and d.ttl.example.com will
 
381
   have a TTL of 3600 seconds, c.ttl.example.com will have a TTL of 9600
 
382
   seconds, and e.ttl.example.com will have a TTL of 7200 seconds:
 
383
 
 
384
 a.ttl.example.com.       10.0.0.1
 
385
 /ttl 3600
 
386
 b.ttl.example.com.       10.0.0.2
 
387
 c.ttl.example.com. +9600 10.0.0.3
 
388
 d.ttl.example.com.       10.0.0.4
 
389
 /ttl 7200
 
390
 e.ttl.example.com.       10.0.0.5
 
391
 
 
392
Origin
 
393
 
 
394
   It is possible to change the host name suffix that is used to substitute
 
395
   the percent in a csv2 zone file. This suffix is called, for historical and
 
396
   compatibility reasons, "origin". This is done as the slash command
 
397
   '/origin', taking the new origin as the one argument to this function.
 
398
   Note that changing the origin does not change the domain suffix used to
 
399
   determine whether a given domain name is authoritative.
 
400
 
 
401
   Here is one example usage of the '/origin' slash command:
 
402
 
 
403
 /origin example.com.
 
404
 www.% 10.1.0.1
 
405
 % MX 10 mail.%
 
406
 mail.% 10.1.0.2
 
407
 /origin example.org.
 
408
 www.% 10.2.0.1
 
409
 % MX 10 mail.%
 
410
 mail.% 10.2.0.2
 
411
 
 
412
   Which is equivalent to:
 
413
 
 
414
 www.example.com. 10.1.0.1
 
415
 example.com. MX 10 mail.example.com.
 
416
 mail.example.com. 10.1.0.2
 
417
 www.example.org. 10.2.0.1
 
418
 example.org. MX 10 mail.example.org.
 
419
 mail.example.org. 10.2.0.2
 
420
 
 
421
   It is also possible to make the current origin be part of the new origin:
 
422
 
 
423
 /origin example.com.
 
424
 % 10.3.2.1 # example.com now has IP 10.3.2.1
 
425
 /origin mail.%
 
426
 % 10.3.2.2 # mail.example.com now has IP 10.3.2.2
 
427
 
 
428
Opush and Opop
 
429
 
 
430
   The '/opush' and '/opop' slash commands use a stack to remember and later
 
431
   recall values for the origin (see origin above). The '/opush' command is
 
432
   used just like the '/origin' command; however, the current origin is
 
433
   placed on a stack instead of discarded. The '/opop' command removes
 
434
   ("pops") the top element from this stack and makes the element the origin.
 
435
 
 
436
   For example:
 
437
 
 
438
 /origin example.com.
 
439
 /opush mail.% # origin is now mail.example.com; example.com is on stack
 
440
 a.% 10.4.0.1 # a.mail.example.com has IP 10.4.0.1
 
441
 /opush web.example.com. # mail.example.com and example.com are on stack
 
442
 a.% 10.5.0.1 # a.web.example.com has IP 10.5.0.1
 
443
 b.% 10.5.0.2 # b.web.example.com has IP 10.5.0.2
 
444
 /opop # origin is now mail.example.com again
 
445
 b.% 10.4.0.2 # b.mail.example.com has IP 10.4.0.2
 
446
 /opop # origin is now example.com
 
447
 % MX 10 a.mail.% # example.com. MX 10 a.mail.example.com.
 
448
 % MX 20 b.mail.% # example.com. MX 20 b.mail.example.com.
 
449
 
 
450
   The opush/opop stack can have up to seven elements on it.
 
451
 
 
452
Read
 
453
 
 
454
   The '/read' slash commands allows one to have the contents of another file
 
455
   in a zone. The '/read' command takes a single argument: A filename that
 
456
   one wishes to read. The filename is only allowed to have letters, numbers,
 
457
   the '-' character, the '_' character, and the '.' character in it.
 
458
 
 
459
   The file needs to be in the same directory as the zone file. The file will
 
460
   be read with the same privileges as the zone file; content in the file
 
461
   should come from a trusted source or be controlled by the system
 
462
   administrator.
 
463
 
 
464
   Let us suppose that we have the following in a zone file:
 
465
 
 
466
 mail.foo.example.com. 10.3.2.1
 
467
 /read foo
 
468
 foo.example.com. MX 10 mail.foo.example.com.
 
469
 
 
470
   And a file foo with the following contents:
 
471
 
 
472
 foo.example.com. 10.1.2.3
 
473
 foo.example.com. TXT 'Foomatic!'
 
474
 
 
475
   Then foo.example.com will have an A record with the value 10.1.2.3, a TXT
 
476
   value of 'Foomatic!', and a MX record with priority 10 pointing to
 
477
   mail.foo.example.com. mail.foo.example.com will have the IP 10.3.2.1.
 
478
 
 
479
   Note that no pre-processing nor post-processing of the origin is done by
 
480
   the '/read' command; should the file read change the origin, this changed
 
481
   value will affect any records after the '/read' command. For example, let
 
482
   us suppose db.example.com looks like this:
 
483
 
 
484
 /origin foo.example.com.
 
485
 % TXT 'Foomatic!'
 
486
 /read foo
 
487
 % MX 10 mail.foo.example.com.
 
488
 
 
489
   And the file foo looks like this:
 
490
 
 
491
 % 10.1.2.3
 
492
 /origin mail.%
 
493
 % 10.3.2.1
 
494
 
 
495
   Then the following records will be created:
 
496
 
 
497
 foo.example.com.      TXT   'Foomatic!'
 
498
 foo.example.com.      A     10.1.2.3
 
499
 mail.foo.example.com. A     10.3.2.1
 
500
 mail.foo.example.com. MX 10 mail.foo.example.com.
 
501
 
 
502
   To have something that works like '$INCLUDE filename' in a RFC1035 master
 
503
   file, do the following:
 
504
 
 
505
 /opush %
 
506
 /read filename
 
507
 /opop
 
508
 
 
509
   Or, for that matter, the equivalent of '$INCLUDE filename neworigin':
 
510
 
 
511
 /opush neworigin.
 
512
 /read filename
 
513
 /opop
197
514
 
198
515
                               EXAMPLE ZONE FILE
199
516