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 zup.example.com. 3600 IN A 1.2.3.4 40 yyy.example.com. 3600 IN A 1.2.3.4 41 yyy.example.com. 3600 IN AAAA 2001:db8::5 42 r1.example.com. 3600 IN A 1.2.3.4 43 r1.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 44 r2.example.com. 3600 IN A 1.2.3.4 45 r2.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 46 r2.example.com. 3600 IN RRSIG AAAA 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 47 r3.example.com. 3600 IN A 1.2.3.4 48 r3.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 49 r3.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 12345 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 50 add.example.com. 3600 IN A 1.2.3.4 51 TEMPFILE_END 52 53 stub-zone: 54 name: "." 55 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 56 CONFIG_END 57 58 SCENARIO_BEGIN Test authority zone with IXFR 59 60 ; K.ROOT-SERVERS.NET. 61 RANGE_BEGIN 0 100 62 ADDRESS 193.0.14.129 63 ENTRY_BEGIN 64 MATCH opcode qtype qname 65 ADJUST copy_id 66 REPLY QR NOERROR 67 SECTION QUESTION 68 . IN NS 69 SECTION ANSWER 70 . IN NS K.ROOT-SERVERS.NET. 71 SECTION ADDITIONAL 72 K.ROOT-SERVERS.NET. IN A 193.0.14.129 73 ENTRY_END 74 75 ENTRY_BEGIN 76 MATCH opcode subdomain 77 ADJUST copy_id copy_query 78 REPLY QR NOERROR 79 SECTION QUESTION 80 com. IN NS 81 SECTION AUTHORITY 82 com. IN NS a.gtld-servers.net. 83 SECTION ADDITIONAL 84 a.gtld-servers.net. IN A 192.5.6.30 85 ENTRY_END 86 RANGE_END 87 88 ; a.gtld-servers.net. 89 RANGE_BEGIN 0 100 90 ADDRESS 192.5.6.30 91 ENTRY_BEGIN 92 MATCH opcode qtype qname 93 ADJUST copy_id 94 REPLY QR NOERROR 95 SECTION QUESTION 96 com. IN NS 97 SECTION ANSWER 98 com. IN NS a.gtld-servers.net. 99 SECTION ADDITIONAL 100 a.gtld-servers.net. IN A 192.5.6.30 101 ENTRY_END 102 103 ENTRY_BEGIN 104 MATCH opcode subdomain 105 ADJUST copy_id copy_query 106 REPLY QR NOERROR 107 SECTION QUESTION 108 example.com. IN NS 109 SECTION AUTHORITY 110 example.com. IN NS ns.example.com. 111 SECTION ADDITIONAL 112 ns.example.com. IN A 1.2.3.44 113 ENTRY_END 114 RANGE_END 115 116 ; ns.example.net. 117 RANGE_BEGIN 0 100 118 ADDRESS 1.2.3.44 119 ENTRY_BEGIN 120 MATCH opcode qtype qname 121 ADJUST copy_id 122 REPLY QR NOERROR 123 SECTION QUESTION 124 example.net. IN NS 125 SECTION ANSWER 126 example.net. IN NS ns.example.net. 127 SECTION ADDITIONAL 128 ns.example.net. IN A 1.2.3.44 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 A 137 SECTION ANSWER 138 ns.example.net. IN A 1.2.3.44 139 SECTION AUTHORITY 140 example.net. IN NS ns.example.net. 141 ENTRY_END 142 143 ENTRY_BEGIN 144 MATCH opcode qtype qname 145 ADJUST copy_id 146 REPLY QR NOERROR 147 SECTION QUESTION 148 ns.example.net. IN AAAA 149 SECTION AUTHORITY 150 example.net. IN NS ns.example.net. 151 SECTION ADDITIONAL 152 www.example.net. IN A 1.2.3.44 153 ENTRY_END 154 155 ENTRY_BEGIN 156 MATCH opcode qtype qname 157 ADJUST copy_id 158 REPLY QR NOERROR 159 SECTION QUESTION 160 example.com. IN NS 161 SECTION ANSWER 162 example.com. IN NS ns.example.net. 163 ENTRY_END 164 165 ENTRY_BEGIN 166 MATCH opcode qtype qname 167 ADJUST copy_id 168 REPLY QR NOERROR 169 SECTION QUESTION 170 www.example.com. IN A 171 SECTION ANSWER 172 www.example.com. IN A 10.20.30.40 173 ENTRY_END 174 175 ENTRY_BEGIN 176 MATCH opcode qtype qname 177 ADJUST copy_id 178 REPLY QR NOERROR 179 SECTION QUESTION 180 example.com. IN SOA 181 SECTION ANSWER 182 ; serial, refresh, retry, expire, minimum 183 example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 184 ENTRY_END 185 186 ENTRY_BEGIN 187 MATCH opcode qtype qname 188 ADJUST copy_id 189 REPLY QR AA NOERROR 190 SECTION QUESTION 191 example.com. IN IXFR 192 SECTION ANSWER 193 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 194 example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600 195 www.example.com. IN A 1.2.3.4 196 mail.example.com. 3600 IN A 1.2.3.6 197 zup.example.com. 3600 IN A 1.2.3.4 198 yyy.example.com. 3600 IN AAAA 2001:db8::5 199 r1.example.com. 3600 IN A 1.2.3.4 200 r2.example.com. 3600 IN A 1.2.3.4 201 r3.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 12345 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 202 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 203 EXTRA_PACKET 204 REPLY QR AA NOERROR 205 SECTION QUESTION 206 example.com. IN IXFR 207 SECTION ANSWER 208 www.example.com. IN A 1.2.3.5 209 mail.example.com. 3600 IN A 1.2.3.8 210 mail.example.com. IN AAAA 2001:db8::5 211 add2.example.com. 3600 IN A 1.2.3.4 212 example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 213 ENTRY_END 214 RANGE_END 215 216 STEP 1 QUERY 217 ENTRY_BEGIN 218 REPLY RD 219 SECTION QUESTION 220 www.example.com. IN A 221 ENTRY_END 222 STEP 2 TIME_PASSES ELAPSE 1 223 224 ; recursion happens here. 225 STEP 20 CHECK_ANSWER 226 ENTRY_BEGIN 227 MATCH all 228 REPLY QR AA RD RA NOERROR 229 SECTION QUESTION 230 www.example.com. IN A 231 SECTION ANSWER 232 www.example.com. IN A 1.2.3.4 233 ENTRY_END 234 235 STEP 30 TIME_PASSES ELAPSE 3600 236 STEP 40 TRAFFIC 237 238 STEP 50 QUERY 239 ENTRY_BEGIN 240 REPLY RD 241 SECTION QUESTION 242 www.example.com. IN A 243 ENTRY_END 244 245 ; recursion happens here. 246 STEP 60 CHECK_ANSWER 247 ENTRY_BEGIN 248 MATCH all 249 REPLY QR AA RD RA NOERROR 250 SECTION QUESTION 251 www.example.com. IN A 252 SECTION ANSWER 253 www.example.com. IN A 1.2.3.5 254 ENTRY_END 255 256 ; the zonefile was updated with new contents 257 STEP 70 CHECK_TEMPFILE example.com 258 FILE_BEGIN 259 example.com. 3600 IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600 260 example.com. 3600 IN NS ns.example.net. 261 add.example.com. 3600 IN A 1.2.3.4 262 add2.example.com. 3600 IN A 1.2.3.4 263 mail.example.com. 3600 IN A 1.2.3.4 264 mail.example.com. 3600 IN A 1.2.3.5 265 mail.example.com. 3600 IN A 1.2.3.7 266 mail.example.com. 3600 IN A 1.2.3.8 267 mail.example.com. 3600 IN AAAA 2001:db8::5 268 r1.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 269 r2.example.com. 3600 IN RRSIG AAAA 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 270 r2.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 271 r3.example.com. 3600 IN A 1.2.3.4 272 r3.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk= 273 www.example.com. 3600 IN A 1.2.3.5 274 yyy.example.com. 3600 IN A 1.2.3.4 275 FILE_END 276 277 SCENARIO_END 278