summaryrefslogtreecommitdiff
path: root/examples/ldns-gen-zone.1
blob: 0e5a0dc678d83d90f0faac93428c722d5056614f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.TH ldns-gen-zone 1 "10 June 2010"
.SH NAME
ldns-gen-zone \- read a zonefile and print it while adding DS records and extra RR's
.SH SYNOPSIS
.B ldns-gen-zone 
.IR ZONEFILE 

.SH DESCRIPTION

\fBldns-gen-zone\fR reads a DNS zone file and prints it. 

It is build for speed, not for a nice formatting. The output
has one resource record per line and no pretty-printing makeup.

DNSSEC data (NSEC, NSEC3, RRSIG or DNSKEY) is not stripped. You may want to
use \fBldns-read-zone\fR for that. Existing DS records are also not stripped.

The idea is to use this tool for quickly generating a representative
artificial zonefile from a real zonefile, to use it for testing purposes.

.SH OPTIONS
.TP
\fB-a NUM\fR
Adds NUM extra artificial NS RRSets to the output. 
The RRSets owner names start
with 'xn--' in an attempt to ensure uniqueness (nl.-zone does not support
IDN's - and this tool was written with that knowledge in mind).

An artificial NS RRSet has two NS records; ns1.example.com and
ns2.example.com.

.TP
\fB-p NUM\fR
Add NUM% of DS RRSets to the NS RRSets (anywhere between
1-4 DS records per RRSet).

.TP
\fB-o ORIGIN\fR
Sets an $ORIGIN, which can be handy if the one in the zonefile
is set to '@' for example. If there is an $ORIGIN in the zonefile,
this option will silently be ignored.

.TP
\fB-s\fR
This is the recommended way of processing large zones that
are already sorted and canonicalized (ie lowercase). It skips the
sorting and canonicalization step that is required for properly
grouping RRSets together (before adding any DS records to them. Skipping
this step will speed things up.

It is not recommended to use this option if you want to add DS records
to unsorted, non-canonicalized zones.

.TP
\fB-h\fR
Show usage and exit.

.TP
\fB-v\fR
Show version and exit.

.SH EXAMPLES

.TP
\fBldns-gen-zone \-a 100000 \-p 10 \-s ./zonefile.txt\fR
Read a zonefile, add 100.000 artificial NS RRSets and 10% of DS records,
print it to standard output. Don't sort (will only work well if the input
zonefile is already sorted and canonicalized).

.TP
\fBldns-gen-zone \-p 10 \-s \-o nl zonefile.txt | named-compilezone \-s relative \-i none \-o zonefile_10.txt nl /dev/stdin\fR
This creates a nicely formatted zone file with the help of \fBnamed-compilezone\fR.
It adds 10% DS records to the .nl zone, reformats it and saves it as \fBzonefile_10.txt\fR.

.SH AUTHOR
Initially written by Marco Davids, several modifications added by Miek
Gieben, both from SIDN.

.SH REPORTING BUGS
Report bugs to <ldns-team@nlnetlabs.nl>.

.SH BUGS
Only undiscovered ones.

.SH CAVEATS
May require a machine with a considerable amount of memory for large zone files.

Fake DS records hashes are generated as digest type SHA-256 (RFC4509). Be aware not to change
the DIGESTTYPE #define in the source code in anything else but 2 if you want
to keep things realistic.

Despite a number of efforts, this program is still not the fastest in the
world.

.SH COPYRIGHT
Copyright (C) 2010 SIDN. This is free software. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.