genzone.sh 11.9 KB
Newer Older
1 2
#!/bin/sh
#
3
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
Mark Andrews's avatar
Mark Andrews committed
4
#
5 6 7
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 9 10
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
Mark Andrews's avatar
Mark Andrews committed
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
#
# Set up a test zone
#
# Usage: genzone.sh master-server-number slave-server-number...
#
# e.g., "genzone.sh 2 3 4" means ns2 is the master and ns3, ns4
# are slaves.
#

master="$1"

cat <<EOF
\$TTL 3600

@		86400	IN SOA	ns${master} hostmaster (
					1397051952 ; "SER0"
					5
					5
					1814400
					3600 )
EOF

for n
do
	cat <<EOF
@			NS	ns${n}
ns${n}			A	10.53.0.${n}
EOF
done

cat <<\EOF

; type 1
a01			A	0.0.0.0
a02			A	255.255.255.255

; type 2
; see NS records at top of file

; type 3
52 53
; md01			MD	madname
; 			MD	.
54 55

; type 4
56 57
; mf01			MF	madname
; mf01			MF	.
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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115

; type 5
cname01			CNAME	cname-target.
cname02			CNAME	cname-target
cname03			CNAME	.

; type 6
; see SOA record at top of file

; type 7
mb01			MG	madname
mb02			MG	.

; type 8
mg01			MG	mgmname
mg02			MG	.

; type 9
mr01			MR	mrname
mr02			MR	.

; type 10
; NULL RRs are not allowed in master files per RFC1035.
;null01			NULL

; type 11
wks01			WKS	10.0.0.1 tcp telnet ftp 0 1 2
wks02			WKS	10.0.0.1 udp domain 0 1 2
wks03			WKS	10.0.0.2 tcp 65535

; type 12
ptr01			PTR	@

; type 13
hinfo01			HINFO	"Generic PC clone" "NetBSD-1.4"
hinfo02			HINFO	PC NetBSD

; type 14
minfo01			MINFO	rmailbx emailbx
minfo02			MINFO	. . 

; type 15
mx01			MX	10 mail
mx02			MX	10 .

; type 16
txt01			TXT	"foo"
txt02			TXT	"foo" "bar"
txt03			TXT	foo
txt04			TXT	foo bar
txt05			TXT	"foo bar"
txt06			TXT	"foo\032bar"
txt07			TXT	foo\032bar
txt08			TXT	"foo\010bar"
txt09			TXT	foo\010bar
txt10			TXT	foo\ bar
txt11			TXT	"\"foo\""
txt12			TXT	\"foo\"
116 117 118
txt13			TXT	"foo;"
txt14			TXT	"foo\;"
txt15			TXT	"bar\\;"
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153

; type 17
rp01			RP	mbox-dname txt-dname
rp02			RP	. . 

; type 18
afsdb01			AFSDB	0 hostname
afsdb02			AFSDB	65535 .

; type 19
x2501			X25	123456789
;x2502			X25	"123456789"

; type 20
isdn01			ISDN	"isdn-address"
isdn02			ISDN	"isdn-address" "subaddress"
isdn03			ISDN	isdn-address
isdn04			ISDN	isdn-address subaddress

; type 21
rt01			RT	0 intermediate-host
rt02			RT	65535 .

; type 22
nsap01			NSAP	(
	0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00 )
nsap02			NSAP	(
	0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00. )
;nsap03			NSAP	0x

; type 23
nsap-ptr01		NSAP-PTR foo.
nsap-ptr01		NSAP-PTR .

; type 24
154 155 156 157 158
;sig01			SIG	NXT 1 3 ( 3600 20000102030405
;				19961211100908 2143 foo.nil. 
;				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
;				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
;				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
159 160

; type 25
161 162 163 164
;key01			KEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
;				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
;				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
;				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
165 166 167 168 169 170 171 172 173

; type 26
px01			PX	65535 foo. bar.
px02			PX	65535 . .

; type 27
gpos01			GPOS    -22.6882 116.8652 250.0
gpos02			GPOS    "" "" ""

174 175 176 177
; type 28
aaaa01			AAAA    ::1
aaaa02			AAAA    fd92:7065:b8e:ffff::5

178 179 180 181 182 183
; type 29
loc01			LOC	60 9 N 24 39 E 10 20 2000 20
loc02			LOC 	60 09 00.000 N 24 39 00.000 E 10.00m 20.00m (
				  2000.00m 20.00m )

; type 30
184 185 186 187
;nxt01			NXT	a.secure.nil. ( NS SOA MX RRSIG KEY LOC NXT )
;nxt02			NXT	. NXT NSAP-PTR
;nxt03			NXT	. 1
;nxt04			NXT	. 127
188

Mark Andrews's avatar
Mark Andrews committed
189 190 191 192 193
; type 31
eid01			EID	12 89 AB

; type 32
nimloc01		NIMLOC	12 89 AB
194

195
; type 33
Mark Andrews's avatar
Mark Andrews committed
196 197
srv01			SRV	0 0 0 .
srv02			SRV	65535 65535 65535  old-slow-box
198

Mark Andrews's avatar
Mark Andrews committed
199 200 201 202 203
; type 34
atma01			ATMA	+61200000000
atma02			ATMA	+61.2.0000.0000
atma03			ATMA	1234567890abcdef
atma04			ATMA	f.e.d.c.b.a.0.9.8.7.6.5.4.3.2.1
204

205 206
; type 35
naptr01			NAPTR   0 0 "" "" "" . 
207 208
naptr02			NAPTR   65535 65535 blurgh blorf blllbb foo.
naptr02			NAPTR   65535 65535 "blurgh" "blorf" "blllbb" foo.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229

; type 36
kx01			KX	10 kdc
kx02			KX	10 .

; type 37
cert01			CERT	65534 65535 254 ( 
				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )
; type 38
a601			A6	0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
a601			A6	64 ::ffff:ffff:ffff:ffff foo.
a601			A6	127 ::1 foo.
a601			A6	128 .

; type 39
dname01			DNAME	dname-target.
dname02			DNAME	dname-target
dname03			DNAME	.

230 231 232 233
; type 40
sink01			SINK	1 0 0
sink02			SINK	8 0 2 l4ik

234 235 236
; type 41
; OPT is a meta-type and should never occur in master files.

237 238
; type 42
apl01			APL	!1:10.0.0.1/32 1:10.0.0.0/24
239
apl02			APL
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264

; type 43
ds01			DS	12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13
ds01			NS	ns42
ds02			DS	12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390
ds02			NS	ns43

; type 44
sshfp01			SSHFP	4 2 C76D8329954DA2835751E371544E963EFDA099080D6C58DD2BFD9A31 6E162C83
sshfp02			SSHFP	1 2 BF29468C83AC58CCF8C85AB7B3BEB054ECF1E38512B8353AB36471FA 88961DCC

; type 45
ipseckey01		IPSECKEY	10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==
ipseckey02		IPSECKEY	10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ==
ipseckey03		IPSECKEY	( 10 1 2
					  192.0.2.3
					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )
ipseckey04		IPSECKEY	( 10 3 2
					  mygateway.example.com.
					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )

ipseckey05		IPSECKEY	( 10 2 2
					  2001:0DB8:0:8002::2000:1
					  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )

265 266 267 268 269 270 271 272 273 274
; type 46
rrsig01			RRSIG	NSEC 1 3 ( 3600 20000102030405
				19961211100908 2143 foo.nil. 
				MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I
				kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t
				VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= )

; type 47
nsec01			NSEC	a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC )
nsec02			NSEC	. NSEC NSAP-PTR
275 276
nsec03			NSEC	. TYPE1
nsec04			NSEC	. TYPE127
277 278 279 280 281 282

; type 48
dnskey01		DNSKEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
Evan Hunt's avatar
Evan Hunt committed
283

284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
; type 49
dhcid01			DHCID	( AAIBY2/AuCccgoJbsaxcQc9TUapptP69l
				  OjxfNuVAA2kjEA= )
dhcid02			DHCID	( AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdW
				  L3b/NaiUDlW2No= )
dhcid03			DHCID	( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V
				  ytcKD//7es/deY= )

; type 50
8f1tmio9avcom2k0frp92lgcumak0cad	NSEC3 1 0 10 D2CF0294C020CE6C 8FPNS2UCT7FBS643THP2B77PEQ77K6IU  A NS SOA MX AAAA RRSIG DNSKEY NSEC3PARAM
kcd3juae64f9c5csl1kif1htaui7un0g	NSEC3 1 0 10 D2CF0294C020CE6C KD5MN2M20340DGO0BL7NTSB8JP4BSC7E
mr5ukvsk1l37btu4q7b1dfevft4hkqdk	NSEC3 1 0 10 D2CF0294C020CE6C MT38J6VG7S0SN5G17MCUF6IQIKFUAJ05  A AAAA RRSIG

; type 51
; @			NSEC3PARAM 1 0 1 868BCF7ED4108929

; type 52
tlsa			TLSA	( 1 1 2 92003ba34942dc74152e2f2c408d29ec
				a5a520e7f2e06bb944f4dca346baf63c
				1b177615d466f6c4b71c216a50292bd5
				8c9ebdd2f74e38fe51ffd48c43326cbc )

; type 53
smimea			SMIMEA	( 1 1 2 92003ba34942dc74152e2f2c408d29ec
				a5a520e7f2e06bb944f4dca346baf63c
				1b177615d466f6c4b71c216a50292bd5
				8c9ebdd2f74e38fe51ffd48c43326cbc )

; type 54 (unassigned)

; type 55
hip1			HIP	( 2 200100107B1A74DF365639CC39F1D578
				AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D )

hip2			HIP	( 2 200100107B1A74DF365639CC39F1D578
                                AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
				rvs.example.com. )

322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
; type 56
ninfo01			NINFO	"foo"
ninfo02			NINFO	"foo" "bar"
ninfo03			NINFO	foo
ninfo04			NINFO	foo bar
ninfo05			NINFO	"foo bar"
ninfo06			NINFO	"foo\032bar"
ninfo07			NINFO	foo\032bar
ninfo08			NINFO	"foo\010bar"
ninfo09			NINFO	foo\010bar
ninfo10			NINFO	foo\ bar
ninfo11			NINFO	"\"foo\""
ninfo12			NINFO	\"foo\"
ninfo13			NINFO	"foo;"
ninfo14			NINFO	"foo\;"
ninfo15			NINFO	"bar\\;"

339 340 341 342 343 344
; type 57
rkey01			RKEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )

345 346 347 348 349
; type 58
talink0			TALINK	. talink1
talink1			TALINK	talink0 talink2
talink2			TALINK	talink2 .

Evan Hunt's avatar
Evan Hunt committed
350 351 352 353 354 355 356 357 358 359
; type 59
cds01			CDS	30795 1 1 (
					310D27F4D82C1FC2400704EA9939FE6E1CEA
					A3B9 )

; type 60
cdnskey01		CDNSKEY	512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY
				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )
360

361 362 363 364 365 366
; type 61
openpgpkey		OPENPGPKEY	( AQMFD5raczCJHViKtLYhWGz8hMY
				9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV
				sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg
				a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= )

367 368 369 370
;type	62
csync01			CSYNC	0 0 A NS AAAA
csync02			CSYNC	0 0

Evan Hunt's avatar
Evan Hunt committed
371 372 373 374 375 376 377 378
;type	63
zonemd01		ZONEMD	2019020700 1 0 (
                                C220B8A6ED5728A971902F7E3D4FD93A
                                DEEA88B0453C2E8E8C863D465AB06CF3
                                4EB95B266398C98B59124FA239CB7EEB
				)

; type 64 -- 98 (unassigned)
379 380 381 382 383

; type 99
spf01			SPF	"v=spf1 -all"
spf02			SPF	"v=spf1" " -all"

384 385 386 387 388 389 390 391
; type 100 (UINFO - not implemented by BIND - unknown record format only)
uinfo01			UINFO	\# 1 01

; type 101 (UID - not implemented by BIND - unknown record format only)
uid01			UID	\# 1 02

; type 102 (GID - not implemented by BIND - unknown record format only)
gid01			GID	\# 1 03
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414

; type 103 (UNSPEC - XXXMUKS TODO - this has some weird encoding - see btoa_totext())

; type 104
nid			NID	10 0014:4fff:ff20:ee64

; type 105
l32			L32	10 1.2.3.4

; type 106
l64			L64	10 0014:4fff:ff20:ee64

; type 107
lp			LP	10 example.net.

; type 108
eui48			EUI48	01-23-45-67-89-ab

; type 109
eui64			EUI64	01-23-45-67-89-ab-cd-ef

; type 110 -- 248 (unassigned)

415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
; type 249
; TKEY is a meta-type and should never occur in master files.
; The text representation is not specified in the draft.
; This example was written based on the bind9 RR parsing code.
;tkey01			TKEY	928321914 928321915 (
;				255		; algorithm
;				65535 		; mode
;				0		; error
;				3 		; key size
;				aaaa		; key data
;				3 		; other size
;				bbbb		; other data
;				)
;; A TKEY with empty "other data"
;tkey02			TKEY	928321914 928321915 (
;				255		; algorithm
;				65535 		; mode
;				0		; error
;				3 		; key size
;				aaaa		; key data
;				0 		; other size
;						; other data
;				)

; type 255
440
; * is a meta-type and should never occur in master files.
Francis Dupont's avatar
Francis Dupont committed
441 442 443 444

; type 256
uri01			URI	10 20 "https://www.isc.org/"
uri02			URI	30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
445
uri03			URI	30 40 ""
Francis Dupont's avatar
Francis Dupont committed
446

Evan Hunt's avatar
Evan Hunt committed
447
; type 257
448 449 450 451
caa01			CAA	0 issue "ca.example.net; policy=ev"
caa02			CAA	128 tbs "Unknown"
caa03			CAA	128 tbs ""

452 453 454
; type 258
avc			AVC	foo:bar

455 456 457 458 459 460 461 462 463 464
; type 259
doa01			DOA	( 1234567890 1234567890 1 "image/gif"
				  R0lGODlhKAAZAOMCAGZmZgBmmf///zOZzMz//5nM/zNmmWbM/5nMzMzMzACZ////
				  /////////////////yH5BAEKAA8ALAAAAAAoABkAAATH8IFJK5U2a4337F5ogRkp
				  noCJrly7PrCKyh8c3HgAhzT35MDbbtO7/IJIHbGiOiaTxVTpSVWWLqNq1UVyapNS
				  1wd3OAxug0LhnCubcVhsxysQnOt4ATpvvzHlFzl1AwODhWeFAgRpen5/UhheAYMF
				  dUB4SFcpGEGGdQeCAqBBLTuSk30EeXd9pEsAbKGxjHqDSE0Sp6ixN4N1BJmbc7lI
				  hmsBich1awPAjkY1SZR8bJWrz382SGqIBQQFQd4IsUTaX+ceuudPEQA7 )
doa02			DOA	0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8=

Mark Andrews's avatar
Mark Andrews committed
465 466 467 468 469 470 471 472 473
; type 260
atmrelay01		ATMRELAY 0 0 0
atmrelay02		ATMRELAY 0 1 0
atmrelay03		ATMRELAY 0 0 1 0.0.0.0
atmrelay04		ATMRELAY 0 0 2 ::
atmrelay05		ATMRELAY 0 0 3 example.net.
atmrelay06		ATMRELAY \# 2 0004

; type 261 -- 32767 (unassigned)
474

475 476 477 478 479 480 481 482 483
; type 32768
ta			TA	30795 1 1 (
					310D27F4D82C1FC2400704EA9939FE6E1CEA
					A3B9 )

; type 32769
dlv			DLV	30795 1 1 (
					310D27F4D82C1FC2400704EA9939FE6E1CEA
					A3B9 )
Evan Hunt's avatar
Evan Hunt committed
484

485 486 487 488
; type 32770 -- 65279 (unassigned)

; type 65280-65534 (private use)

Evan Hunt's avatar
Evan Hunt committed
489
; keydata (internal type used for managed-keys)
490 491 492 493
keydata			TYPE65533	\# 0
keydata			TYPE65533	\# 6 010203040506 
keydata			TYPE65533	\# 18 010203040506010203040506010203040506

494 495
; type 65535 (reserved)

496
EOF