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 zonemd-check: yes 26 27 ## this line generates zonefile: \n"/tmp/xxx.example.com"\n 28 zonefile: 29 TEMPFILE_NAME example.com 30 ## this is the inline file /tmp/xxx.example.com 31 ## the tempfiles are deleted when the testrun is over. 32 TEMPFILE_CONTENTS example.com 33 TEMPFILE_END 34 35 stub-zone: 36 name: "." 37 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 38 CONFIG_END 39 40 SCENARIO_BEGIN Test authority zone with AXFR with ZONEMD 41 42 ; K.ROOT-SERVERS.NET. 43 RANGE_BEGIN 0 100 44 ADDRESS 193.0.14.129 45 ENTRY_BEGIN 46 MATCH opcode qtype qname 47 ADJUST copy_id 48 REPLY QR NOERROR 49 SECTION QUESTION 50 . IN NS 51 SECTION ANSWER 52 . IN NS K.ROOT-SERVERS.NET. 53 SECTION ADDITIONAL 54 K.ROOT-SERVERS.NET. IN A 193.0.14.129 55 ENTRY_END 56 57 ENTRY_BEGIN 58 MATCH opcode subdomain 59 ADJUST copy_id copy_query 60 REPLY QR NOERROR 61 SECTION QUESTION 62 com. IN NS 63 SECTION AUTHORITY 64 com. IN NS a.gtld-servers.net. 65 SECTION ADDITIONAL 66 a.gtld-servers.net. IN A 192.5.6.30 67 ENTRY_END 68 RANGE_END 69 70 ; a.gtld-servers.net. 71 RANGE_BEGIN 0 100 72 ADDRESS 192.5.6.30 73 ENTRY_BEGIN 74 MATCH opcode qtype qname 75 ADJUST copy_id 76 REPLY QR NOERROR 77 SECTION QUESTION 78 com. IN NS 79 SECTION ANSWER 80 com. IN NS a.gtld-servers.net. 81 SECTION ADDITIONAL 82 a.gtld-servers.net. IN A 192.5.6.30 83 ENTRY_END 84 85 ENTRY_BEGIN 86 MATCH opcode subdomain 87 ADJUST copy_id copy_query 88 REPLY QR NOERROR 89 SECTION QUESTION 90 example.com. IN NS 91 SECTION AUTHORITY 92 example.com. IN NS ns.example.com. 93 SECTION ADDITIONAL 94 ns.example.com. IN A 1.2.3.44 95 ENTRY_END 96 RANGE_END 97 98 ; ns.example.net. 99 RANGE_BEGIN 0 100 100 ADDRESS 1.2.3.44 101 ENTRY_BEGIN 102 MATCH opcode qtype qname 103 ADJUST copy_id 104 REPLY QR NOERROR 105 SECTION QUESTION 106 example.net. IN NS 107 SECTION ANSWER 108 example.net. IN NS ns.example.net. 109 SECTION ADDITIONAL 110 ns.example.net. IN A 1.2.3.44 111 ENTRY_END 112 113 ENTRY_BEGIN 114 MATCH opcode qtype qname 115 ADJUST copy_id 116 REPLY QR NOERROR 117 SECTION QUESTION 118 ns.example.net. IN A 119 SECTION ANSWER 120 ns.example.net. IN A 1.2.3.44 121 SECTION AUTHORITY 122 example.net. IN NS ns.example.net. 123 ENTRY_END 124 125 ENTRY_BEGIN 126 MATCH opcode qtype qname 127 ADJUST copy_id 128 REPLY QR NOERROR 129 SECTION QUESTION 130 ns.example.net. IN AAAA 131 SECTION AUTHORITY 132 example.net. IN NS ns.example.net. 133 SECTION ADDITIONAL 134 www.example.net. IN A 1.2.3.44 135 ENTRY_END 136 137 ENTRY_BEGIN 138 MATCH opcode qtype qname 139 ADJUST copy_id 140 REPLY QR NOERROR 141 SECTION QUESTION 142 example.com. IN NS 143 SECTION ANSWER 144 example.com. IN NS ns.example.net. 145 ENTRY_END 146 147 ENTRY_BEGIN 148 MATCH opcode qtype qname 149 ADJUST copy_id 150 REPLY QR NOERROR 151 SECTION QUESTION 152 www.example.com. IN A 153 SECTION ANSWER 154 www.example.com. IN A 10.20.30.40 155 ENTRY_END 156 157 ENTRY_BEGIN 158 MATCH opcode qtype qname 159 ADJUST copy_id 160 REPLY QR NOERROR 161 SECTION QUESTION 162 example.com. IN SOA 163 SECTION ANSWER 164 ; serial, refresh, retry, expire, minimum 165 example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600 166 ENTRY_END 167 168 ENTRY_BEGIN 169 MATCH opcode qtype qname 170 ADJUST copy_id 171 REPLY QR AA NOERROR 172 SECTION QUESTION 173 example.com. IN AXFR 174 SECTION ANSWER 175 example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600 176 example.com. IN NS ns.example.com. 177 example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22 178 www.example.com. IN A 127.0.0.1 179 ns.example.com. IN A 127.0.0.1 180 bar.example.com. IN A 1.2.3.4 181 ding.example.com. IN A 1.2.3.4 182 foo.example.com. IN A 1.2.3.4 183 example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600 184 ENTRY_END 185 RANGE_END 186 187 STEP 1 QUERY 188 ENTRY_BEGIN 189 REPLY RD 190 SECTION QUESTION 191 www.example.com. IN A 192 ENTRY_END 193 194 ; recursion happens here. 195 STEP 20 CHECK_ANSWER 196 ENTRY_BEGIN 197 MATCH all 198 REPLY QR AA RD RA SERVFAIL 199 SECTION QUESTION 200 www.example.com. IN A 201 SECTION ANSWER 202 ENTRY_END 203 204 STEP 30 TIME_PASSES ELAPSE 10 205 STEP 40 TRAFFIC 206 207 STEP 50 QUERY 208 ENTRY_BEGIN 209 REPLY RD 210 SECTION QUESTION 211 www.example.com. IN A 212 ENTRY_END 213 214 ; recursion happens here. 215 STEP 60 CHECK_ANSWER 216 ENTRY_BEGIN 217 MATCH all 218 REPLY QR AA RD RA NOERROR 219 SECTION QUESTION 220 www.example.com. IN A 221 SECTION ANSWER 222 www.example.com. IN A 127.0.0.1 223 ENTRY_END 224 225 ; the zonefile was updated with new contents 226 STEP 70 CHECK_TEMPFILE example.com 227 FILE_BEGIN 228 example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600 229 example.com. 3600 IN NS ns.example.com. 230 example.com. 3600 IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22 231 bar.example.com. 3600 IN A 1.2.3.4 232 ding.example.com. 3600 IN A 1.2.3.4 233 foo.example.com. 3600 IN A 1.2.3.4 234 ns.example.com. 3600 IN A 127.0.0.1 235 www.example.com. 3600 IN A 127.0.0.1 236 FILE_END 237 238 SCENARIO_END 239