1 ; config options 2 server: 3 target-fetch-policy: "0 0 0 0 0" 4 qname-minimisation: "no" 5 minimal-responses: no 6 iter-scrub-promiscuous: no 7 discard-timeout: 86400 8 9 stub-zone: 10 name: "." 11 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 12 CONFIG_END 13 14 SCENARIO_BEGIN Test ghost subdomain with extension reply in timewindow. 15 16 ; K.ROOT-SERVERS.NET. 17 RANGE_BEGIN 0 100 18 ADDRESS 193.0.14.129 19 ENTRY_BEGIN 20 MATCH opcode qtype qname 21 ADJUST copy_id 22 REPLY QR AA NOERROR 23 SECTION QUESTION 24 . 86400 IN NS 25 SECTION ANSWER 26 . 86400 IN NS K.ROOT-SERVERS.NET. 27 SECTION ADDITIONAL 28 K.ROOT-SERVERS.NET. 86400 IN A 193.0.14.129 29 ENTRY_END 30 31 ENTRY_BEGIN 32 MATCH opcode subdomain 33 ADJUST copy_id copy_query 34 REPLY QR NOERROR 35 SECTION QUESTION 36 com. IN NS 37 SECTION AUTHORITY 38 com. 86400 IN NS a.gtld-servers.net. 39 SECTION ADDITIONAL 40 a.gtld-servers.net. 86400 IN A 192.5.6.30 41 ENTRY_END 42 43 RANGE_END 44 45 ; a.gtld-servers.net. 46 ; this is the one where example.com is delegated. 47 RANGE_BEGIN 0 100 48 ADDRESS 192.5.6.30 49 ENTRY_BEGIN 50 MATCH opcode qtype qname 51 ADJUST copy_id 52 REPLY QR AA NOERROR 53 SECTION QUESTION 54 com. IN NS 55 SECTION ANSWER 56 com. 86400 IN NS a.gtld-servers.net. 57 SECTION ADDITIONAL 58 a.gtld-servers.net. 86400 IN A 192.5.6.30 59 ENTRY_END 60 61 ENTRY_BEGIN 62 MATCH opcode subdomain 63 ADJUST copy_id copy_query 64 REPLY QR NOERROR 65 SECTION QUESTION 66 example.com. IN NS 67 SECTION AUTHORITY 68 example.com. IN NS ns.example.com. 69 SECTION ADDITIONAL 70 ns.example.com. IN A 1.2.3.4 71 ENTRY_END 72 73 ENTRY_BEGIN 74 MATCH opcode subdomain 75 ADJUST copy_id copy_query 76 REPLY QR NOERROR 77 SECTION QUESTION 78 example2.com. IN NS 79 SECTION AUTHORITY 80 example2.com. 3610 IN NS ns.example2.com. 81 SECTION ADDITIONAL 82 ns.example2.com. 3610 IN A 1.2.3.5 83 ENTRY_END 84 RANGE_END 85 86 ; a.gtld-servers.net. 87 ; this is the one where example.com is no longer delegated. 88 RANGE_BEGIN 100 300 89 ADDRESS 192.5.6.30 90 ENTRY_BEGIN 91 MATCH opcode qtype qname 92 ADJUST copy_id 93 REPLY QR AA NOERROR 94 SECTION QUESTION 95 com. IN NS 96 SECTION ANSWER 97 com. 86400 IN NS a.gtld-servers.net. 98 SECTION ADDITIONAL 99 a.gtld-servers.net. 86400 IN A 192.5.6.30 100 ENTRY_END 101 102 ENTRY_BEGIN 103 MATCH opcode subdomain 104 ADJUST copy_id copy_query 105 REPLY QR NXDOMAIN 106 SECTION QUESTION 107 example.com. IN NS 108 SECTION AUTHORITY 109 com. 86400 IN SOA a. b. 1 2 3 4 5 110 ENTRY_END 111 112 ENTRY_BEGIN 113 MATCH opcode subdomain 114 ADJUST copy_id copy_query 115 REPLY QR NXDOMAIN 116 SECTION QUESTION 117 example2.com. IN NS 118 SECTION AUTHORITY 119 com. 86400 IN SOA a. b. 1 2 3 4 5 120 ENTRY_END 121 RANGE_END 122 123 ; ns.example.com. 124 RANGE_BEGIN 0 100 125 ADDRESS 1.2.3.4 126 ENTRY_BEGIN 127 MATCH opcode qtype qname 128 ADJUST copy_id 129 REPLY QR AA NOERROR 130 SECTION QUESTION 131 example.com. IN NS 132 SECTION ANSWER 133 example.com. IN NS ns.example.com. 134 SECTION ADDITIONAL 135 ns.example.com. IN A 1.2.3.4 136 ENTRY_END 137 138 ENTRY_BEGIN 139 MATCH opcode qtype qname 140 ADJUST copy_id 141 REPLY QR AA NOERROR 142 SECTION QUESTION 143 ns.example.com. IN A 144 SECTION ANSWER 145 ns.example.com. IN A 1.2.3.4 146 SECTION AUTHORITY 147 example.com. IN NS ns.example.com. 148 ENTRY_END 149 150 ENTRY_BEGIN 151 MATCH opcode qtype qname 152 ADJUST copy_id 153 REPLY QR AA NOERROR 154 SECTION QUESTION 155 ns.example.com. IN AAAA 156 SECTION AUTHORITY 157 example.com. IN NS ns.example.com. 158 SECTION ADDITIONAL 159 ns.example.com. IN A 1.2.3.4 160 ENTRY_END 161 162 ENTRY_BEGIN 163 MATCH opcode qtype qname 164 ADJUST copy_id 165 REPLY QR AA NOERROR 166 SECTION QUESTION 167 www.example.com. IN A 168 SECTION ANSWER 169 www.example.com. IN A 10.20.30.40 170 SECTION AUTHORITY 171 example.com. IN NS ns.example.com. 172 SECTION ADDITIONAL 173 ns.example.com IN A 1.2.3.4 174 ENTRY_END 175 RANGE_END 176 177 ; ns.example2.com. 178 RANGE_BEGIN 0 100 179 ADDRESS 1.2.3.5 180 ENTRY_BEGIN 181 MATCH opcode qtype qname 182 ADJUST copy_id 183 REPLY QR AA NOERROR 184 SECTION QUESTION 185 example2.com. IN NS 186 SECTION ANSWER 187 example2.com. 3610 IN NS ns.example2.com. 188 SECTION ADDITIONAL 189 ns.example2.com. 3610 IN A 1.2.3.5 190 ENTRY_END 191 192 ENTRY_BEGIN 193 MATCH opcode qtype qname 194 ADJUST copy_id 195 REPLY QR AA NOERROR 196 SECTION QUESTION 197 ns.example2.com. IN A 198 SECTION ANSWER 199 ns.example2.com. 3610 IN A 1.2.3.5 200 SECTION AUTHORITY 201 example2.com. 3610 IN NS ns.example2.com. 202 ENTRY_END 203 204 ENTRY_BEGIN 205 MATCH opcode qtype qname 206 ADJUST copy_id 207 REPLY QR AA NOERROR 208 SECTION QUESTION 209 ns.example2.com. IN AAAA 210 SECTION AUTHORITY 211 example2.com. 3610 IN NS ns.example2.com. 212 SECTION ADDITIONAL 213 ns.example2.com. 3610 IN A 1.2.3.5 214 ENTRY_END 215 216 ENTRY_BEGIN 217 MATCH opcode qtype qname 218 ADJUST copy_id 219 REPLY QR AA NOERROR 220 SECTION QUESTION 221 www.example2.com. IN A 222 SECTION ANSWER 223 www.example2.com. 3610 IN A 10.20.30.40 224 SECTION AUTHORITY 225 example2.com. 3610 IN NS ns.example2.com. 226 SECTION ADDITIONAL 227 ns.example2.com 3610 IN A 1.2.3.5 228 ENTRY_END 229 RANGE_END 230 231 STEP 1 QUERY 232 ENTRY_BEGIN 233 REPLY RD 234 SECTION QUESTION 235 www.example.com. IN A 236 ENTRY_END 237 238 ; get the delegation in cache 239 STEP 20 CHECK_ANSWER 240 ENTRY_BEGIN 241 MATCH all 242 REPLY QR RD RA NOERROR 243 SECTION QUESTION 244 www.example.com. IN A 245 SECTION ANSWER 246 www.example.com. IN A 10.20.30.40 247 SECTION AUTHORITY 248 example.com. IN NS ns.example.com. 249 SECTION ADDITIONAL 250 ns.example.com IN A 1.2.3.4 251 ENTRY_END 252 253 ; get example2 in cache too to check other response type 254 STEP 30 QUERY 255 ENTRY_BEGIN 256 REPLY RD 257 SECTION QUESTION 258 www.example2.com. IN A 259 ENTRY_END 260 261 STEP 40 CHECK_ANSWER 262 ENTRY_BEGIN 263 MATCH all 264 REPLY QR RD RA NOERROR 265 SECTION QUESTION 266 www.example2.com. IN A 267 SECTION ANSWER 268 www.example2.com. IN A 10.20.30.40 269 SECTION AUTHORITY 270 example2.com. IN NS ns.example2.com. 271 SECTION ADDITIONAL 272 ns.example2.com IN A 1.2.3.5 273 ENTRY_END 274 275 ; time passes 276 STEP 95 TIME_PASSES ELAPSE 3595 277 278 STEP 100 QUERY 279 ENTRY_BEGIN 280 REPLY RD 281 SECTION QUESTION 282 ns.example.com. IN A 283 ENTRY_END 284 285 ; ns.example.com RANGE does not answer, only until step 100, 286 ; so we provide an answer, but first, let time pass beyond the TTL. 287 ; it is going to time 3605, just passed the 3600 expire TTL, but the 288 ; query started at 3595 before the TTL expired. 289 STEP 110 TIME_PASSES ELAPSE 10 290 291 ; provide the answer to the query sent. 292 STEP 120 CHECK_OUT_QUERY 293 ENTRY_BEGIN 294 MATCH opcode qtype qname 295 ADJUST copy_id 296 REPLY QR AA NOERROR 297 SECTION QUESTION 298 ns.example.com. IN A 299 SECTION ANSWER 300 SECTION AUTHORITY 301 example.com. IN NS ns.example.com. 302 SECTION ADDITIONAL 303 ns.example.com IN A 1.2.3.4 304 ENTRY_END 305 306 STEP 130 CHECK_ANSWER 307 ENTRY_BEGIN 308 MATCH all 309 REPLY QR RD RA NOERROR 310 SECTION QUESTION 311 ns.example.com. IN A 312 SECTION AUTHORITY 313 example.com. IN NS ns.example.com. 314 SECTION ADDITIONAL 315 ns.example.com. IN A 1.2.3.4 316 ENTRY_END 317 318 ; check if the domain is still live. 319 STEP 140 QUERY 320 ENTRY_BEGIN 321 REPLY RD 322 SECTION QUESTION 323 www2.example.com. IN A 324 ENTRY_END 325 326 STEP 150 CHECK_ANSWER 327 ENTRY_BEGIN 328 MATCH all 329 REPLY QR RD RA NXDOMAIN 330 SECTION QUESTION 331 www2.example.com. IN A 332 SECTION AUTHORITY 333 com. 86400 IN SOA a. b. 1 2 3 4 5 334 ENTRY_END 335 336 ; example2 is valid with TTL of 3610, it is time 3605 337 STEP 160 QUERY 338 ENTRY_BEGIN 339 REPLY RD 340 SECTION QUESTION 341 ns.example2.com. IN A 342 ENTRY_END 343 344 ; move to time 3615 345 STEP 170 TIME_PASSES ELAPSE 10 346 347 STEP 180 CHECK_OUT_QUERY 348 ENTRY_BEGIN 349 MATCH opcode qtype qname 350 ADJUST copy_id 351 REPLY QR AA NOERROR 352 SECTION QUESTION 353 ns.example2.com. IN A 354 SECTION ANSWER 355 ns.example2.com. IN A 1.2.3.5 356 SECTION AUTHORITY 357 example2.com. IN NS ns.example2.com. 358 SECTION ADDITIONAL 359 ns.example2.com. IN A 1.2.3.5 360 ENTRY_END 361 362 STEP 190 CHECK_ANSWER 363 ENTRY_BEGIN 364 MATCH all 365 REPLY QR RD RA NOERROR 366 SECTION QUESTION 367 ns.example2.com. IN A 368 SECTION ANSWER 369 ns.example2.com IN A 1.2.3.5 370 SECTION AUTHORITY 371 example2.com. IN NS ns.example2.com. 372 SECTION ADDITIONAL 373 ENTRY_END 374 375 ; check if the domain is still live. 376 STEP 200 QUERY 377 ENTRY_BEGIN 378 REPLY RD 379 SECTION QUESTION 380 www2.example2.com. IN A 381 ENTRY_END 382 383 STEP 210 CHECK_ANSWER 384 ENTRY_BEGIN 385 MATCH all 386 REPLY QR RD RA NXDOMAIN 387 SECTION QUESTION 388 www2.example2.com. IN A 389 SECTION AUTHORITY 390 com. 86400 IN SOA a. b. 1 2 3 4 5 391 ENTRY_END 392 393 SCENARIO_END 394