Home | History | Annotate | Line # | Download | only in testdata
      1 ; config options
      2 server:
      3 	target-fetch-policy: "0 0 0 0 0"
      4 
      5 auth-zone:
      6 	name: "example.com."
      7 	## zonefile (or none).
      8 	## zonefile: "example.com.zone"
      9 	## master by IP address or hostname
     10 	## can list multiple masters, each on one line.
     11 	## master:
     12 	master: 1.2.3.44
     13 	## url for http fetch
     14 	## url:
     15 	## queries from downstream clients get authoritative answers.
     16 	## for-downstream: yes
     17 	for-downstream: yes
     18 	## queries are used to fetch authoritative answers from this zone,
     19 	## instead of unbound itself sending queries there.
     20 	## for-upstream: yes
     21 	for-upstream: yes
     22 	## on failures with for-upstream, fallback to sending queries to
     23 	## the authority servers
     24 	## fallback-enabled: no
     25 
     26 	## this line generates zonefile: \n"/tmp/xxx.example.com"\n
     27 	zonefile:
     28 TEMPFILE_NAME example.com
     29 	## this is the inline file /tmp/xxx.example.com
     30 	## the tempfiles are deleted when the testrun is over.
     31 TEMPFILE_CONTENTS example.com
     32 example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
     33 example.com.	3600	IN	NS	ns.example.net.
     34 www.example.com.	3600	IN	A	1.2.3.4
     35 mail.example.com.	3600	IN	A	1.2.3.4
     36 mail.example.com.	3600	IN	A	1.2.3.5
     37 mail.example.com.	3600	IN	A	1.2.3.6
     38 mail.example.com.	3600	IN	A	1.2.3.7
     39 TEMPFILE_END
     40 
     41 stub-zone:
     42 	name: "."
     43 	stub-addr: 193.0.14.129 	# K.ROOT-SERVERS.NET.
     44 CONFIG_END
     45 
     46 SCENARIO_BEGIN Test authority zone with IXFR that has mismatched data
     47 
     48 ; K.ROOT-SERVERS.NET.
     49 RANGE_BEGIN 0 100
     50 	ADDRESS 193.0.14.129 
     51 ENTRY_BEGIN
     52 MATCH opcode qtype qname
     53 ADJUST copy_id
     54 REPLY QR NOERROR
     55 SECTION QUESTION
     56 . IN NS
     57 SECTION ANSWER
     58 . IN NS	K.ROOT-SERVERS.NET.
     59 SECTION ADDITIONAL
     60 K.ROOT-SERVERS.NET.	IN	A	193.0.14.129
     61 ENTRY_END
     62 
     63 ENTRY_BEGIN
     64 MATCH opcode subdomain
     65 ADJUST copy_id copy_query
     66 REPLY QR NOERROR
     67 SECTION QUESTION
     68 com. IN NS
     69 SECTION AUTHORITY
     70 com.	IN NS	a.gtld-servers.net.
     71 SECTION ADDITIONAL
     72 a.gtld-servers.net.	IN 	A	192.5.6.30
     73 ENTRY_END
     74 RANGE_END
     75 
     76 ; a.gtld-servers.net.
     77 RANGE_BEGIN 0 100
     78 	ADDRESS 192.5.6.30
     79 ENTRY_BEGIN
     80 MATCH opcode qtype qname
     81 ADJUST copy_id
     82 REPLY QR NOERROR
     83 SECTION QUESTION
     84 com. IN NS
     85 SECTION ANSWER
     86 com.	IN NS	a.gtld-servers.net.
     87 SECTION ADDITIONAL
     88 a.gtld-servers.net.	IN 	A	192.5.6.30
     89 ENTRY_END
     90 
     91 ENTRY_BEGIN
     92 MATCH opcode subdomain
     93 ADJUST copy_id copy_query
     94 REPLY QR NOERROR
     95 SECTION QUESTION
     96 example.com. IN NS
     97 SECTION AUTHORITY
     98 example.com.	IN NS	ns.example.com.
     99 SECTION ADDITIONAL
    100 ns.example.com. IN A 1.2.3.44
    101 ENTRY_END
    102 RANGE_END
    103 
    104 ; ns.example.net.
    105 RANGE_BEGIN 0 100
    106 	ADDRESS 1.2.3.44
    107 ENTRY_BEGIN
    108 MATCH opcode qtype qname
    109 ADJUST copy_id
    110 REPLY QR NOERROR
    111 SECTION QUESTION
    112 example.net. IN NS
    113 SECTION ANSWER
    114 example.net.	IN NS	ns.example.net.
    115 SECTION ADDITIONAL
    116 ns.example.net.		IN 	A	1.2.3.44
    117 ENTRY_END
    118 
    119 ENTRY_BEGIN
    120 MATCH opcode qtype qname
    121 ADJUST copy_id
    122 REPLY QR NOERROR
    123 SECTION QUESTION
    124 ns.example.net. IN A
    125 SECTION ANSWER
    126 ns.example.net. IN A	1.2.3.44
    127 SECTION AUTHORITY
    128 example.net.	IN NS	ns.example.net.
    129 ENTRY_END
    130 
    131 ENTRY_BEGIN
    132 MATCH opcode qtype qname
    133 ADJUST copy_id
    134 REPLY QR NOERROR
    135 SECTION QUESTION
    136 ns.example.net. IN AAAA
    137 SECTION AUTHORITY
    138 example.net.	IN NS	ns.example.net.
    139 SECTION ADDITIONAL
    140 www.example.net. IN A	1.2.3.44
    141 ENTRY_END
    142 
    143 ENTRY_BEGIN
    144 MATCH opcode qtype qname
    145 ADJUST copy_id
    146 REPLY QR NOERROR
    147 SECTION QUESTION
    148 example.com. IN NS
    149 SECTION ANSWER
    150 example.com.	IN NS	ns.example.net.
    151 ENTRY_END
    152 
    153 ENTRY_BEGIN
    154 MATCH opcode qtype qname
    155 ADJUST copy_id
    156 REPLY QR NOERROR
    157 SECTION QUESTION
    158 www.example.com. IN A
    159 SECTION ANSWER
    160 www.example.com. IN A	10.20.30.40
    161 ENTRY_END
    162 
    163 ENTRY_BEGIN
    164 MATCH opcode qtype qname
    165 ADJUST copy_id
    166 REPLY QR NOERROR
    167 SECTION QUESTION
    168 example.com. IN SOA
    169 SECTION ANSWER
    170 ; serial, refresh, retry, expire, minimum
    171 example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    172 ENTRY_END
    173 
    174 ENTRY_BEGIN
    175 MATCH opcode qtype qname
    176 ADJUST copy_id
    177 REPLY QR AA NOERROR
    178 SECTION QUESTION
    179 example.com. IN IXFR
    180 SECTION ANSWER
    181 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    182 example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
    183 www.example.com. IN A	1.2.3.4
    184 mail.example.com.	3600	IN	A	1.2.3.6
    185 ; this is the delete of the nonexistent entry
    186 nonexist.example.com.	3600	IN	A	1.2.3.4
    187 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    188 EXTRA_PACKET
    189 REPLY QR AA NOERROR
    190 SECTION QUESTION
    191 example.com. IN IXFR
    192 SECTION ANSWER
    193 www.example.com. IN A	1.2.3.5
    194 mail.example.com.	3600	IN	A	1.2.3.8
    195 mail.example.com. IN AAAA	::5
    196 add2.example.com.	3600	IN	A	1.2.3.4
    197 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    198 ENTRY_END
    199 
    200 ENTRY_BEGIN
    201 MATCH opcode qtype qname
    202 ADJUST copy_id
    203 REPLY QR AA NOERROR
    204 SECTION QUESTION
    205 example.com. IN AXFR
    206 SECTION ANSWER
    207 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    208 example.com.	IN NS	ns.example.net.
    209 EXTRA_PACKET
    210 REPLY QR AA NOERROR
    211 SECTION QUESTION
    212 example.com. IN AXFR
    213 SECTION ANSWER
    214 www.example.com. IN A	1.2.3.6
    215 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    216 ENTRY_END
    217 RANGE_END
    218 
    219 STEP 1 QUERY
    220 ENTRY_BEGIN
    221 REPLY RD
    222 SECTION QUESTION
    223 www.example.com. IN A
    224 ENTRY_END
    225 STEP 2 TIME_PASSES ELAPSE 1
    226 
    227 ; recursion happens here.
    228 STEP 20 CHECK_ANSWER
    229 ENTRY_BEGIN
    230 MATCH all
    231 REPLY QR AA RD RA NOERROR
    232 SECTION QUESTION
    233 www.example.com. IN A
    234 SECTION ANSWER
    235 www.example.com. IN A	1.2.3.4
    236 ENTRY_END
    237 
    238 STEP 30 TIME_PASSES ELAPSE 3600
    239 STEP 40 TRAFFIC
    240 
    241 STEP 50 QUERY
    242 ENTRY_BEGIN
    243 REPLY RD
    244 SECTION QUESTION
    245 www.example.com. IN A
    246 ENTRY_END
    247 
    248 ; recursion happens here.
    249 STEP 60 CHECK_ANSWER
    250 ENTRY_BEGIN
    251 MATCH all
    252 REPLY QR AA RD RA NOERROR
    253 SECTION QUESTION
    254 www.example.com. IN A
    255 SECTION ANSWER
    256 www.example.com. IN A	1.2.3.6
    257 ENTRY_END
    258 
    259 ; the zonefile was updated with new contents
    260 STEP 70 CHECK_TEMPFILE example.com
    261 FILE_BEGIN
    262 example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
    263 example.com.	3600	IN	NS	ns.example.net.
    264 www.example.com.	3600	IN	A	1.2.3.6
    265 FILE_END
    266 
    267 SCENARIO_END
    268