Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / bind / dist / bin / tests / system / genzone.sh
blob87fa9a20a11179f55502686e80117a860168fa62
1 #!/bin/sh
3 # Copyright (C) 2004, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2001-2003 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # Id: genzone.sh,v 1.11 2009/02/26 06:09:19 marka Exp
21 # Set up a test zone
23 # Usage: genzone.sh master-server-number slave-server-number...
25 # e.g., "genzone.sh 2 3 4" means ns2 is the master and ns3, ns4
26 # are slaves.
29 master="$1"
31 cat <<EOF
32 \$TTL 3600
34 @ 86400 IN SOA ns${master} hostmaster (
35 1397051952 ; "SER0"
38 1814400
39 3600 )
40 EOF
42 for n
44 cat <<EOF
45 @ NS ns${n}
46 ns${n} A 10.53.0.${n}
47 EOF
48 done
50 cat <<\EOF
52 ; type 1
53 a01 A 0.0.0.0
54 a02 A 255.255.255.255
56 ; type 2
57 ; see NS records at top of file
59 ; type 3
60 ; md01 MD madname
61 ; MD .
63 ; type 4
64 ; mf01 MF madname
65 ; mf01 MF .
67 ; type 5
68 cname01 CNAME cname-target.
69 cname02 CNAME cname-target
70 cname03 CNAME .
72 ; type 6
73 ; see SOA record at top of file
75 ; type 7
76 mb01 MG madname
77 mb02 MG .
79 ; type 8
80 mg01 MG mgmname
81 mg02 MG .
83 ; type 9
84 mr01 MR mrname
85 mr02 MR .
87 ; type 10
88 ; NULL RRs are not allowed in master files per RFC1035.
89 ;null01 NULL
91 ; type 11
92 wks01 WKS 10.0.0.1 tcp telnet ftp 0 1 2
93 wks02 WKS 10.0.0.1 udp domain 0 1 2
94 wks03 WKS 10.0.0.2 tcp 65535
96 ; type 12
97 ptr01 PTR @
99 ; type 13
100 hinfo01 HINFO "Generic PC clone" "NetBSD-1.4"
101 hinfo02 HINFO PC NetBSD
103 ; type 14
104 minfo01 MINFO rmailbx emailbx
105 minfo02 MINFO . .
107 ; type 15
108 mx01 MX 10 mail
109 mx02 MX 10 .
111 ; type 16
112 txt01 TXT "foo"
113 txt02 TXT "foo" "bar"
114 txt03 TXT foo
115 txt04 TXT foo bar
116 txt05 TXT "foo bar"
117 txt06 TXT "foo\032bar"
118 txt07 TXT foo\032bar
119 txt08 TXT "foo\010bar"
120 txt09 TXT foo\010bar
121 txt10 TXT foo\ bar
122 txt11 TXT "\"foo\""
123 txt12 TXT \"foo\"
125 ; type 17
126 rp01 RP mbox-dname txt-dname
127 rp02 RP . .
129 ; type 18
130 afsdb01 AFSDB 0 hostname
131 afsdb02 AFSDB 65535 .
133 ; type 19
134 x2501 X25 123456789
135 ;x2502 X25 "123456789"
137 ; type 20
138 isdn01 ISDN "isdn-address"
139 isdn02 ISDN "isdn-address" "subaddress"
140 isdn03 ISDN isdn-address
141 isdn04 ISDN isdn-address subaddress
143 ; type 21
144 rt01 RT 0 intermediate-host
145 rt02 RT 65535 .
147 ; type 22
148 nsap01 NSAP (
149 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00 )
150 nsap02 NSAP (
151 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00. )
152 ;nsap03 NSAP 0x
154 ; type 23
155 nsap-ptr01 NSAP-PTR foo.
156 nsap-ptr01 NSAP-PTR .
158 ; type 24
159 ;sig01 SIG NXT 1 3 ( 3600 20000102030405
160 ; 19961211100908 2143 foo.nil.
161 ; MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
162 ; kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
163 ; VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
165 ; type 25
166 ;key01 KEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
167 ; 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
168 ; sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
169 ; a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
171 ; type 26
172 px01 PX 65535 foo. bar.
173 px02 PX 65535 . .
175 ; type 27
176 gpos01 GPOS -22.6882 116.8652 250.0
177 gpos02 GPOS "" "" ""
179 ; type 29
180 loc01 LOC 60 9 N 24 39 E 10 20 2000 20
181 loc02 LOC 60 09 00.000 N 24 39 00.000 E 10.00m 20.00m (
182 2000.00m 20.00m )
184 ; type 30
185 ;nxt01 NXT a.secure.nil. ( NS SOA MX RRSIG KEY LOC NXT )
186 ;nxt02 NXT . NXT NSAP-PTR
187 ;nxt03 NXT . 1
188 ;nxt04 NXT . 127
190 ; type 33
191 srv01 SRV 0 0 0 .
192 srv02 SRV 65535 65535 65535 old-slow-box
194 ; type 35
195 naptr01 NAPTR 0 0 "" "" "" .
196 naptr02 NAPTR 65535 65535 blurgh blorf blllbb foo.
197 naptr02 NAPTR 65535 65535 "blurgh" "blorf" "blllbb" foo.
199 ; type 36
200 kx01 KX 10 kdc
201 kx02 KX 10 .
203 ; type 37
204 cert01 CERT 65534 65535 254 (
205 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
206 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
207 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
208 ; type 38
209 a601 A6 0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
210 a601 A6 64 ::ffff:ffff:ffff:ffff foo.
211 a601 A6 127 ::1 foo.
212 a601 A6 128 .
214 ; type 39
215 dname01 DNAME dname-target.
216 dname02 DNAME dname-target
217 dname03 DNAME .
219 ; type 41
220 ; OPT is a meta-type and should never occur in master files.
222 ; type 46
223 rrsig01 RRSIG NSEC 1 3 ( 3600 20000102030405
224 19961211100908 2143 foo.nil.
225 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
226 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
227 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
229 ; type 47
230 nsec01 NSEC a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC )
231 nsec02 NSEC . NSEC NSAP-PTR
232 nsec03 NSEC . TYPE1
233 nsec04 NSEC . TYPE127
235 ; type 48
236 dnskey01 DNSKEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
237 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
238 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
239 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
241 ; type 249
242 ; TKEY is a meta-type and should never occur in master files.
243 ; The text representation is not specified in the draft.
244 ; This example was written based on the bind9 RR parsing code.
245 ;tkey01 TKEY 928321914 928321915 (
246 ; 255 ; algorithm
247 ; 65535 ; mode
248 ; 0 ; error
249 ; 3 ; key size
250 ; aaaa ; key data
251 ; 3 ; other size
252 ; bbbb ; other data
254 ;; A TKEY with empty "other data"
255 ;tkey02 TKEY 928321914 928321915 (
256 ; 255 ; algorithm
257 ; 65535 ; mode
258 ; 0 ; error
259 ; 3 ; key size
260 ; aaaa ; key data
261 ; 0 ; other size
262 ; ; other data
265 hip1 HIP ( 2 200100107B1A74DF365639CC39F1D578
266 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D )
269 hip2 HIP ( 2 200100107B1A74DF365639CC39F1D578
270 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
271 rvs.example.com. )
273 ; type 255
274 ; TSIG is a meta-type and should never occur in master files.