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