1#!/bin/sh 2# 3# Copyright (C) 2004, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC") 4# Copyright (C) 2001-2003 Internet Software Consortium. 5# 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. 9# 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. 17 18# $Id$ 19 20# 21# Set up a test zone 22# 23# Usage: genzone.sh master-server-number slave-server-number... 24# 25# e.g., "genzone.sh 2 3 4" means ns2 is the master and ns3, ns4 26# are slaves. 27# 28 29master="$1" 30 31cat <<EOF 32\$TTL 3600 33 34@ 86400 IN SOA ns${master} hostmaster ( 35 1397051952 ; "SER0" 36 5 37 5 38 1814400 39 3600 ) 40EOF 41 42for n 43do 44 cat <<EOF 45@ NS ns${n} 46ns${n} A 10.53.0.${n} 47EOF 48done 49 50cat <<\EOF 51 52; type 1 53a01 A 0.0.0.0 54a02 A 255.255.255.255 55 56; type 2 57; see NS records at top of file 58 59; type 3 60; md01 MD madname 61; MD . 62 63; type 4 64; mf01 MF madname 65; mf01 MF . 66 67; type 5 68cname01 CNAME cname-target. 69cname02 CNAME cname-target 70cname03 CNAME . 71 72; type 6 73; see SOA record at top of file 74 75; type 7 76mb01 MG madname 77mb02 MG . 78 79; type 8 80mg01 MG mgmname 81mg02 MG . 82 83; type 9 84mr01 MR mrname 85mr02 MR . 86 87; type 10 88; NULL RRs are not allowed in master files per RFC1035. 89;null01 NULL 90 91; type 11 92wks01 WKS 10.0.0.1 tcp telnet ftp 0 1 2 93wks02 WKS 10.0.0.1 udp domain 0 1 2 94wks03 WKS 10.0.0.2 tcp 65535 95 96; type 12 97ptr01 PTR @ 98 99; type 13 100hinfo01 HINFO "Generic PC clone" "NetBSD-1.4" 101hinfo02 HINFO PC NetBSD 102 103; type 14 104minfo01 MINFO rmailbx emailbx 105minfo02 MINFO . . 106 107; type 15 108mx01 MX 10 mail 109mx02 MX 10 . 110 111; type 16 112txt01 TXT "foo" 113txt02 TXT "foo" "bar" 114txt03 TXT foo 115txt04 TXT foo bar 116txt05 TXT "foo bar" 117txt06 TXT "foo\032bar" 118txt07 TXT foo\032bar 119txt08 TXT "foo\010bar" 120txt09 TXT foo\010bar 121txt10 TXT foo\ bar 122txt11 TXT "\"foo\"" 123txt12 TXT \"foo\" 124 125; type 17 126rp01 RP mbox-dname txt-dname 127rp02 RP . . 128 129; type 18 130afsdb01 AFSDB 0 hostname 131afsdb02 AFSDB 65535 . 132 133; type 19 134x2501 X25 123456789 135;x2502 X25 "123456789" 136 137; type 20 138isdn01 ISDN "isdn-address" 139isdn02 ISDN "isdn-address" "subaddress" 140isdn03 ISDN isdn-address 141isdn04 ISDN isdn-address subaddress 142 143; type 21 144rt01 RT 0 intermediate-host 145rt02 RT 65535 . 146 147; type 22 148nsap01 NSAP ( 149 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00 ) 150nsap02 NSAP ( 151 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00. ) 152;nsap03 NSAP 0x 153 154; type 23 155nsap-ptr01 NSAP-PTR foo. 156nsap-ptr01 NSAP-PTR . 157 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= ) 164 165; type 25 166;key01 KEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 167; 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 168; sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 169; a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 170 171; type 26 172px01 PX 65535 foo. bar. 173px02 PX 65535 . . 174 175; type 27 176gpos01 GPOS -22.6882 116.8652 250.0 177gpos02 GPOS "" "" "" 178 179; type 29 180loc01 LOC 60 9 N 24 39 E 10 20 2000 20 181loc02 LOC 60 09 00.000 N 24 39 00.000 E 10.00m 20.00m ( 182 2000.00m 20.00m ) 183 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 189 190; type 33 191srv01 SRV 0 0 0 . 192srv02 SRV 65535 65535 65535 old-slow-box 193 194; type 35 195naptr01 NAPTR 0 0 "" "" "" . 196naptr02 NAPTR 65535 65535 blurgh blorf blllbb foo. 197naptr02 NAPTR 65535 65535 "blurgh" "blorf" "blllbb" foo. 198 199; type 36 200kx01 KX 10 kdc 201kx02 KX 10 . 202 203; type 37 204cert01 CERT 65534 65535 254 ( 205 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I 206 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t 207 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ) 208; type 38 209a601 A6 0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 210a601 A6 64 ::ffff:ffff:ffff:ffff foo. 211a601 A6 127 ::1 foo. 212a601 A6 128 . 213 214; type 39 215dname01 DNAME dname-target. 216dname02 DNAME dname-target 217dname03 DNAME . 218 219; type 41 220; OPT is a meta-type and should never occur in master files. 221 222; type 46 223rrsig01 RRSIG NSEC 1 3 ( 3600 20000102030405 224 19961211100908 2143 foo.nil. 225 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I 226 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t 227 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ) 228 229; type 47 230nsec01 NSEC a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC ) 231nsec02 NSEC . NSEC NSAP-PTR 232nsec03 NSEC . TYPE1 233nsec04 NSEC . TYPE127 234 235; type 48 236dnskey01 DNSKEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 237 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 238 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 239 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 240 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 253; ) 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 263; ) 264 265hip1 HIP ( 2 200100107B1A74DF365639CC39F1D578 266 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D ) 267 268 269hip2 HIP ( 2 200100107B1A74DF365639CC39F1D578 270 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D 271 rvs.example.com. ) 272 273tlsa TLSA ( 1 1 2 92003ba34942dc74152e2f2c408d29ec 274 a5a520e7f2e06bb944f4dca346baf63c 275 1b177615d466f6c4b71c216a50292bd5 276 8c9ebdd2f74e38fe51ffd48c43326cbc ) 277 278; type 255 279; TSIG is a meta-type and should never occur in master files. 280EOF 281