1#!/bin/sh
2#
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8#
9# See the COPYRIGHT file distributed with this work for additional
10# information regarding copyright ownership.
11
12#
13# Set up a test zone
14#
15# Usage: genzone.sh master-server-number slave-server-number...
16#
17# e.g., "genzone.sh 2 3 4" means ns2 is the master and ns3, ns4
18# are slaves.
19#
20
21master="$1"
22
23cat <<EOF
24\$TTL 3600
25
26@		86400	IN SOA	ns${master} hostmaster (
27					1397051952 ; "SER0"
28					5
29					5
30					1814400
31					3600 )
32EOF
33
34for n
35do
36	cat <<EOF
37@			NS	ns${n}
38ns${n}			A	10.53.0.${n}
39EOF
40done
41
42cat <<\EOF
43
44; type 1
45a01			A	0.0.0.0
46a02			A	255.255.255.255
47
48; type 2
49; see NS records at top of file
50
51; type 3
52; md01			MD	madname
53; 			MD	.
54
55; type 4
56; mf01			MF	madname
57; mf01			MF	.
58
59; type 5
60cname01			CNAME	cname-target.
61cname02			CNAME	cname-target
62cname03			CNAME	.
63
64; type 6
65; see SOA record at top of file
66
67; type 7
68mb01			MG	madname
69mb02			MG	.
70
71; type 8
72mg01			MG	mgmname
73mg02			MG	.
74
75; type 9
76mr01			MR	mrname
77mr02			MR	.
78
79; type 10
80; NULL RRs are not allowed in master files per RFC1035.
81;null01			NULL
82
83; type 11
84wks01			WKS	10.0.0.1 tcp telnet ftp 0 1 2
85wks02			WKS	10.0.0.1 udp domain 0 1 2
86wks03			WKS	10.0.0.2 tcp 65535
87
88; type 12
89ptr01			PTR	@
90
91; type 13
92hinfo01			HINFO	"Generic PC clone" "NetBSD-1.4"
93hinfo02			HINFO	PC NetBSD
94
95; type 14
96minfo01			MINFO	rmailbx emailbx
97minfo02			MINFO	. .
98
99; type 15
100mx01			MX	10 mail
101mx02			MX	10 .
102
103; type 16
104txt01			TXT	"foo"
105txt02			TXT	"foo" "bar"
106txt03			TXT	foo
107txt04			TXT	foo bar
108txt05			TXT	"foo bar"
109txt06			TXT	"foo\032bar"
110txt07			TXT	foo\032bar
111txt08			TXT	"foo\010bar"
112txt09			TXT	foo\010bar
113txt10			TXT	foo\ bar
114txt11			TXT	"\"foo\""
115txt12			TXT	\"foo\"
116txt13			TXT	"foo;"
117txt14			TXT	"foo\;"
118txt15			TXT	"bar\\;"
119
120; type 17
121rp01			RP	mbox-dname txt-dname
122rp02			RP	. .
123
124; type 18
125afsdb01			AFSDB	0 hostname
126afsdb02			AFSDB	65535 .
127
128; type 19
129x2501			X25	123456789
130;x2502			X25	"123456789"
131
132; type 20
133isdn01			ISDN	"isdn-address"
134isdn02			ISDN	"isdn-address" "subaddress"
135isdn03			ISDN	isdn-address
136isdn04			ISDN	isdn-address subaddress
137
138; type 21
139rt01			RT	0 intermediate-host
140rt02			RT	65535 .
141
142; type 22
143nsap01			NSAP	(
144	0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00 )
145nsap02			NSAP	(
146	0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00. )
147;nsap03			NSAP	0x
148
149; type 23
150nsap-ptr01		NSAP-PTR foo.
151nsap-ptr01		NSAP-PTR .
152
153; type 24
154;sig01			SIG	NXT 1 3 ( 3600 20000102030405
155;				19961211100908 2143 foo.nil.
156;				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
157;				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
158;				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
159
160; type 25
161;key01			KEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
162;				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
163;				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
164;				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
165
166; type 26
167px01			PX	65535 foo. bar.
168px02			PX	65535 . .
169
170; type 27
171gpos01			GPOS    -22.6882 116.8652 250.0
172gpos02			GPOS    "" "" ""
173
174; type 28
175aaaa01			AAAA    ::1
176aaaa02			AAAA    fd92:7065:b8e:ffff::5
177
178; type 29
179loc01			LOC	60 9 N 24 39 E 10 20 2000 20
180loc02			LOC 	60 09 00.000 N 24 39 00.000 E 10.00m 20.00m (
181				  2000.00m 20.00m )
182
183; type 30
184;nxt01			NXT	a.secure.nil. ( NS SOA MX RRSIG KEY LOC NXT )
185;nxt02			NXT	. NXT NSAP-PTR
186;nxt03			NXT	. 1
187;nxt04			NXT	. 127
188
189; type 31
190eid01			EID	12 89 AB
191
192; type 32
193nimloc01		NIMLOC	12 89 AB
194
195; type 33
196srv01			SRV	0 0 0 .
197srv02			SRV	65535 65535 65535  old-slow-box
198
199; type 34
200atma01			ATMA	+61200000000
201atma02			ATMA	+61.2.0000.0000
202atma03			ATMA	1234567890abcdef
203atma04			ATMA	f.e.d.c.b.a.0.9.8.7.6.5.4.3.2.1
204
205; type 35
206naptr01			NAPTR   0 0 "" "" "" .
207naptr02			NAPTR   65535 65535 blurgh blorf blllbb foo.
208naptr02			NAPTR   65535 65535 "blurgh" "blorf" "blllbb" foo.
209
210; type 36
211kx01			KX	10 kdc
212kx02			KX	10 .
213
214; type 37
215cert01			CERT	65534 65535 254 (
216				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
217				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
218				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
219; type 38
220a601			A6	0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
221a601			A6	64 ::ffff:ffff:ffff:ffff foo.
222a601			A6	127 ::1 foo.
223a601			A6	128 .
224
225; type 39
226dname01			DNAME	dname-target.
227dname02			DNAME	dname-target
228dname03			DNAME	.
229
230; type 40
231sink01			SINK	1 0 0
232sink02			SINK	8 0 2 l4ik
233
234; type 41
235; OPT is a meta-type and should never occur in master files.
236
237; type 42
238apl01			APL	!1:10.0.0.1/32 1:10.0.0.0/24
239apl02			APL
240
241; type 43
242ds01			DS	12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13
243ds01			NS	ns42
244ds02			DS	12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390
245ds02			NS	ns43
246
247; type 44
248sshfp01			SSHFP	4 2 C76D8329954DA2835751E371544E963EFDA099080D6C58DD2BFD9A31 6E162C83
249sshfp02			SSHFP	1 2 BF29468C83AC58CCF8C85AB7B3BEB054ECF1E38512B8353AB36471FA 88961DCC
250
251; type 45
252ipseckey01		IPSECKEY	10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==
253ipseckey02		IPSECKEY	10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==
254ipseckey03		IPSECKEY	( 10 1 2
255					  192.0.2.3
256					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )
257ipseckey04		IPSECKEY	( 10 3 2
258					  mygateway.example.com.
259					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )
260
261ipseckey05		IPSECKEY	( 10 2 2
262					  2001:0DB8:0:8002::2000:1
263					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )
264
265; type 46
266rrsig01			RRSIG	NSEC 1 3 ( 3600 20000102030405
267				19961211100908 2143 foo.nil.
268				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
269				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
270				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
271
272; type 47
273nsec01			NSEC	a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC )
274nsec02			NSEC	. NSEC NSAP-PTR
275nsec03			NSEC	. TYPE1
276nsec04			NSEC	. TYPE127
277
278; type 48
279dnskey01		DNSKEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
280				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
281				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
282				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
283
284; type 49
285dhcid01			DHCID	( AAIBY2/AuCccgoJbsaxcQc9TUapptP69l
286				  OjxfNuVAA2kjEA= )
287dhcid02			DHCID	( AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdW
288				  L3b/NaiUDlW2No= )
289dhcid03			DHCID	( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V
290				  ytcKD//7es/deY= )
291
292; type 50
2938f1tmio9avcom2k0frp92lgcumak0cad	NSEC3 1 0 10 D2CF0294C020CE6C 8FPNS2UCT7FBS643THP2B77PEQ77K6IU  A NS SOA MX AAAA RRSIG DNSKEY NSEC3PARAM
294kcd3juae64f9c5csl1kif1htaui7un0g	NSEC3 1 0 10 D2CF0294C020CE6C KD5MN2M20340DGO0BL7NTSB8JP4BSC7E
295mr5ukvsk1l37btu4q7b1dfevft4hkqdk	NSEC3 1 0 10 D2CF0294C020CE6C MT38J6VG7S0SN5G17MCUF6IQIKFUAJ05  A AAAA RRSIG
296
297; type 51
298; @			NSEC3PARAM 1 0 1 868BCF7ED4108929
299
300; type 52
301tlsa			TLSA	( 1 1 2 92003ba34942dc74152e2f2c408d29ec
302				a5a520e7f2e06bb944f4dca346baf63c
303				1b177615d466f6c4b71c216a50292bd5
304				8c9ebdd2f74e38fe51ffd48c43326cbc )
305
306; type 53
307smimea			SMIMEA	( 1 1 2 92003ba34942dc74152e2f2c408d29ec
308				a5a520e7f2e06bb944f4dca346baf63c
309				1b177615d466f6c4b71c216a50292bd5
310				8c9ebdd2f74e38fe51ffd48c43326cbc )
311
312; type 54 (unassigned)
313
314; type 55
315hip1			HIP	( 2 200100107B1A74DF365639CC39F1D578
316				AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D )
317
318hip2			HIP	( 2 200100107B1A74DF365639CC39F1D578
319                                AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
320				rvs.example.com. )
321
322; type 56
323ninfo01			NINFO	"foo"
324ninfo02			NINFO	"foo" "bar"
325ninfo03			NINFO	foo
326ninfo04			NINFO	foo bar
327ninfo05			NINFO	"foo bar"
328ninfo06			NINFO	"foo\032bar"
329ninfo07			NINFO	foo\032bar
330ninfo08			NINFO	"foo\010bar"
331ninfo09			NINFO	foo\010bar
332ninfo10			NINFO	foo\ bar
333ninfo11			NINFO	"\"foo\""
334ninfo12			NINFO	\"foo\"
335ninfo13			NINFO	"foo;"
336ninfo14			NINFO	"foo\;"
337ninfo15			NINFO	"bar\\;"
338
339; type 57
340rkey01			RKEY	0 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
341				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
342				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
343				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
344
345; type 58
346talink0			TALINK	. talink1
347talink1			TALINK	talink0 talink2
348talink2			TALINK	talink2 .
349
350; type 59
351cds01			CDS	30795 1 1 (
352					310D27F4D82C1FC2400704EA9939FE6E1CEA
353					A3B9 )
354
355; type 60
356cdnskey01		CDNSKEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
357				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
358				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
359				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
360
361; type 61
362openpgpkey		OPENPGPKEY	( AQMFD5raczCJHViKtLYhWGz8hMY
363				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
364				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
365				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
366
367;type	62
368csync01			CSYNC	0 0 A NS AAAA
369csync02			CSYNC	0 0
370
371;type	63
372zonemd01		ZONEMD	2019020700 1 0 (
373                                C220B8A6ED5728A971902F7E3D4FD93A
374                                DEEA88B0453C2E8E8C863D465AB06CF3
375                                4EB95B266398C98B59124FA239CB7EEB
376				)
377
378; type 64 -- 98 (unassigned)
379
380; type 99
381spf01			SPF	"v=spf1 -all"
382spf02			SPF	"v=spf1" " -all"
383
384; type 100 (UINFO - not implemented by BIND - unknown record format only)
385uinfo01			UINFO	\# 1 01
386
387; type 101 (UID - not implemented by BIND - unknown record format only)
388uid01			UID	\# 1 02
389
390; type 102 (GID - not implemented by BIND - unknown record format only)
391gid01			GID	\# 1 03
392
393; type 103 (UNSPEC - not implemented by BIND - unknown record format only)
394unspec01		UNSPEC	\# 1 04
395
396; type 104
397nid			NID	10 0014:4fff:ff20:ee64
398
399; type 105
400l32			L32	10 1.2.3.4
401
402; type 106
403l64			L64	10 0014:4fff:ff20:ee64
404
405; type 107
406lp			LP	10 example.net.
407
408; type 108
409eui48			EUI48	01-23-45-67-89-ab
410
411; type 109
412eui64			EUI64	01-23-45-67-89-ab-cd-ef
413
414; type 110 -- 248 (unassigned)
415
416; type 249
417; TKEY is a meta-type and should never occur in master files.
418; The text representation is not specified in the draft.
419; This example was written based on the bind9 RR parsing code.
420;tkey01			TKEY	928321914 928321915 (
421;				255		; algorithm
422;				65535 		; mode
423;				0		; error
424;				3 		; key size
425;				aaaa		; key data
426;				3 		; other size
427;				bbbb		; other data
428;				)
429;; A TKEY with empty "other data"
430;tkey02			TKEY	928321914 928321915 (
431;				255		; algorithm
432;				65535 		; mode
433;				0		; error
434;				3 		; key size
435;				aaaa		; key data
436;				0 		; other size
437;						; other data
438;				)
439
440; type 255
441; * is a meta-type and should never occur in master files.
442
443; type 256
444uri01			URI	10 20 "https://www.isc.org/"
445uri02			URI	30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
446uri03			URI	30 40 ""
447
448; type 257
449caa01			CAA	0 issue "ca.example.net; policy=ev"
450caa02			CAA	128 tbs "Unknown"
451caa03			CAA	128 tbs ""
452
453; type 258
454avc			AVC	foo:bar
455
456; type 259
457doa01			DOA	( 1234567890 1234567890 1 "image/gif"
458				  R0lGODlhKAAZAOMCAGZmZgBmmf///zOZzMz//5nM/zNmmWbM/5nMzMzMzACZ////
459				  /////////////////yH5BAEKAA8ALAAAAAAoABkAAATH8IFJK5U2a4337F5ogRkp
460				  noCJrly7PrCKyh8c3HgAhzT35MDbbtO7/IJIHbGiOiaTxVTpSVWWLqNq1UVyapNS
461				  1wd3OAxug0LhnCubcVhsxysQnOt4ATpvvzHlFzl1AwODhWeFAgRpen5/UhheAYMF
462				  dUB4SFcpGEGGdQeCAqBBLTuSk30EeXd9pEsAbKGxjHqDSE0Sp6ixN4N1BJmbc7lI
463				  hmsBich1awPAjkY1SZR8bJWrz382SGqIBQQFQd4IsUTaX+ceuudPEQA7 )
464doa02			DOA	0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8=
465
466; type 260
467amtrelay01		AMTRELAY 0 0 0
468amtrelay02		AMTRELAY 0 1 0
469amtrelay03		AMTRELAY 0 0 1 0.0.0.0
470amtrelay04		AMTRELAY 0 0 2 ::
471amtrelay05		AMTRELAY 0 0 3 example.net.
472amtrelay06		AMTRELAY \# 2 0004
473
474; type 261 -- 32767 (unassigned)
475
476; type 32768
477ta			TA	30795 1 1 (
478					310D27F4D82C1FC2400704EA9939FE6E1CEA
479					A3B9 )
480
481; type 32769
482dlv			DLV	30795 1 1 (
483					310D27F4D82C1FC2400704EA9939FE6E1CEA
484					A3B9 )
485
486; type 32770 -- 65279 (unassigned)
487
488; type 65280-65534 (private use)
489
490; keydata (internal type used for managed keys)
491keydata			TYPE65533	\# 0
492keydata			TYPE65533	\# 6 010203040506
493keydata			TYPE65533	\# 18 010203040506010203040506010203040506
494
495; type 65535 (reserved)
496
497EOF
498