1; config options 2server: 3 target-fetch-policy: "0 0 0 0 0" 4 5stub-zone: 6 name: "." 7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 8CONFIG_END 9 10SCENARIO_BEGIN Test resolver with a domain sale 11; and the old operator is nasty, keeps running his server with the old data. 12; and lots of lookups keep going towards the domain. 13; eventually, the NS record has to timeout. 14 15; K.ROOT-SERVERS.NET. 16RANGE_BEGIN 0 100 17 ADDRESS 193.0.14.129 18ENTRY_BEGIN 19MATCH opcode qtype qname 20ADJUST copy_id 21REPLY QR NOERROR 22SECTION QUESTION 23. IN NS 24SECTION ANSWER 25. IN NS K.ROOT-SERVERS.NET. 26SECTION ADDITIONAL 27K.ROOT-SERVERS.NET. IN A 193.0.14.129 28ENTRY_END 29 30ENTRY_BEGIN 31MATCH opcode subdomain 32ADJUST copy_id copy_query 33REPLY QR NOERROR 34SECTION QUESTION 35com. IN A 36SECTION AUTHORITY 37com. IN NS a.gtld-servers.net. 38SECTION ADDITIONAL 39a.gtld-servers.net. IN A 192.5.6.30 40ENTRY_END 41RANGE_END 42 43; a.gtld-servers.net. (before sale of domain) 44RANGE_BEGIN 0 20 45 ADDRESS 192.5.6.30 46ENTRY_BEGIN 47MATCH opcode qtype qname 48ADJUST copy_id 49REPLY QR NOERROR 50SECTION QUESTION 51com. IN NS 52SECTION ANSWER 53com. IN NS a.gtld-servers.net. 54SECTION ADDITIONAL 55a.gtld-servers.net. IN A 192.5.6.30 56ENTRY_END 57 58ENTRY_BEGIN 59MATCH opcode subdomain 60ADJUST copy_id copy_query 61REPLY QR NOERROR 62SECTION QUESTION 63example.com. IN A 64SECTION AUTHORITY 65example.com. IN NS ns.example.com. 66SECTION ADDITIONAL 67ns.example.com. IN A 1.2.3.4 68ENTRY_END 69RANGE_END 70 71; a.gtld-servers.net. (after sale of domain) 72RANGE_BEGIN 30 200 73 ADDRESS 192.5.6.30 74ENTRY_BEGIN 75MATCH opcode qtype qname 76ADJUST copy_id 77REPLY QR NOERROR 78SECTION QUESTION 79com. IN NS 80SECTION ANSWER 81com. IN NS a.gtld-servers.net. 82SECTION ADDITIONAL 83a.gtld-servers.net. IN A 192.5.6.30 84ENTRY_END 85 86ENTRY_BEGIN 87MATCH opcode subdomain 88ADJUST copy_id copy_query 89REPLY QR NOERROR 90SECTION QUESTION 91example.com. IN A 92SECTION AUTHORITY 93example.com. IN NS ns.example.com. 94SECTION ADDITIONAL 95ns.example.com. IN A 8.8.8.8 96ENTRY_END 97RANGE_END 98 99; ns.example.com. first owner 100RANGE_BEGIN 0 200 101 ADDRESS 1.2.3.4 102ENTRY_BEGIN 103MATCH opcode qtype qname 104ADJUST copy_id 105REPLY QR AA NOERROR 106SECTION QUESTION 107example.com. IN NS 108SECTION ANSWER 109example.com. IN NS ns.example.com. 110SECTION ADDITIONAL 111ns.example.com. IN A 1.2.3.4 112ENTRY_END 113 114ENTRY_BEGIN 115MATCH opcode qname 116ADJUST copy_id copy_query 117REPLY QR AA NOERROR 118SECTION QUESTION 119www.example.com. IN A 120SECTION ANSWER 121www.example.com. 3600 IN A 10.20.30.40 122SECTION AUTHORITY 123example.com. 3600 IN NS ns.example.com. 124SECTION ADDITIONAL 125ns.example.com. 3600 IN A 1.2.3.4 126ENTRY_END 127 128; nxdomains for any name,type 129; last in RANGE so that it matches everything left over. 130; it includes the NS record. 131ENTRY_BEGIN 132MATCH opcode 133ADJUST copy_id copy_query 134REPLY QR AA NXDOMAIN 135SECTION QUESTION 136www.example.com. IN A 137SECTION ANSWER 138SECTION AUTHORITY 139example.com. 3600 IN SOA a. b. 1 2 3 4 5 140example.com. 3600 IN NS ns.example.com. 141SECTION ADDITIONAL 142ns.example.com. 3600 IN A 1.2.3.4 143ENTRY_END 144RANGE_END 145 146; ns.example.com. new owner 147RANGE_BEGIN 0 200 148 ADDRESS 8.8.8.8 149ENTRY_BEGIN 150MATCH opcode qtype qname 151ADJUST copy_id 152REPLY QR AA NOERROR 153SECTION QUESTION 154example.com. IN NS 155SECTION ANSWER 156example.com. IN NS ns.example.com. 157SECTION ADDITIONAL 158ns.example.com. IN A 8.8.8.8 159ENTRY_END 160 161ENTRY_BEGIN 162MATCH opcode qtype qname 163ADJUST copy_id 164REPLY QR AA NOERROR 165SECTION QUESTION 166www.example.com. IN A 167SECTION ANSWER 168www.example.com. 3600 IN A 88.88.88.88 169SECTION AUTHORITY 170example.com. 3600 IN NS ns.example.com. 171SECTION ADDITIONAL 172ns.example.com. 3600 IN A 8.8.8.8 173ENTRY_END 174RANGE_END 175 176; Fetch the old record from the old owner. 177STEP 1 QUERY 178ENTRY_BEGIN 179REPLY RD 180SECTION QUESTION 181www.example.com. IN A 182ENTRY_END 183; recursion happens here. 184STEP 5 CHECK_ANSWER 185ENTRY_BEGIN 186MATCH all ttl 187REPLY QR RD RA NOERROR 188SECTION QUESTION 189www.example.com. IN A 190SECTION ANSWER 191www.example.com. 3600 IN A 10.20.30.40 192SECTION AUTHORITY 193example.com. 3600 IN NS ns.example.com. 194SECTION ADDITIONAL 195ns.example.com. 3600 IN A 1.2.3.4 196ENTRY_END 197 198; the domain is sold (right at this time). 199; but the information stays in the cache. 200 201; after 1800 secs still the cached answer 202STEP 20 TIME_PASSES ELAPSE 1800 203 204STEP 30 QUERY 205ENTRY_BEGIN 206REPLY RD 207SECTION QUESTION 208www.example.com. IN A 209ENTRY_END 210; recursion happens here. 211STEP 40 CHECK_ANSWER 212ENTRY_BEGIN 213MATCH all ttl 214REPLY QR RD RA NOERROR 215SECTION QUESTION 216www.example.com. IN A 217SECTION ANSWER 218www.example.com. 1800 IN A 10.20.30.40 219SECTION AUTHORITY 220example.com. 1800 IN NS ns.example.com. 221SECTION ADDITIONAL 222ns.example.com. 1800 IN A 1.2.3.4 223ENTRY_END 224 225; and ask another query 226STEP 50 QUERY 227ENTRY_BEGIN 228REPLY RD 229SECTION QUESTION 230nx1.example.com. IN A 231ENTRY_END 232; recursion happens here. 233STEP 60 CHECK_ANSWER 234ENTRY_BEGIN 235MATCH all ttl 236REPLY QR RD RA NXDOMAIN 237SECTION QUESTION 238nx1.example.com. IN A 239SECTION ANSWER 240SECTION AUTHORITY 241; at TTL 5 because TTL is capped at min-ttl of 5 in rdata of SOA 242example.com. 5 IN SOA a. b. 1 2 3 4 5 243example.com. 1800 IN NS ns.example.com. 244SECTION ADDITIONAL 245ns.example.com. 1800 IN A 1.2.3.4 246ENTRY_END 247 248; after another 1900 seconds the domain must have timed out. 249STEP 70 TIME_PASSES ELAPSE 1900 250 251; the NS record should have timed out. 252STEP 80 QUERY 253ENTRY_BEGIN 254REPLY RD 255SECTION QUESTION 256www.example.com. IN A 257ENTRY_END 258; recursion happens here. 259STEP 90 CHECK_ANSWER 260ENTRY_BEGIN 261MATCH all ttl 262REPLY QR RD RA NOERROR 263SECTION QUESTION 264www.example.com. IN A 265SECTION ANSWER 266www.example.com. 3600 IN A 88.88.88.88 267SECTION AUTHORITY 268example.com. 3600 IN NS ns.example.com. 269SECTION ADDITIONAL 270ns.example.com. 3600 IN A 8.8.8.8 271ENTRY_END 272 273SCENARIO_END 274