1; config options 2server: 3 target-fetch-policy: "0 0 0 0 0" 4 qname-minimisation: "no" 5 prefetch: "yes" 6 minimal-responses: no 7 8stub-zone: 9 name: "." 10 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 11CONFIG_END 12 13SCENARIO_BEGIN Test resolver prefetch from child nameserver 14; child NS record has longer TTL than A record and is thus valid for prefetch. 15 16; K.ROOT-SERVERS.NET. 17RANGE_BEGIN 0 100 18 ADDRESS 193.0.14.129 19ENTRY_BEGIN 20MATCH opcode qtype qname 21ADJUST copy_id 22REPLY QR NOERROR 23SECTION QUESTION 24. IN NS 25SECTION ANSWER 26. IN NS K.ROOT-SERVERS.NET. 27SECTION ADDITIONAL 28K.ROOT-SERVERS.NET. IN A 193.0.14.129 29ENTRY_END 30 31ENTRY_BEGIN 32MATCH opcode qtype qname 33ADJUST copy_id 34REPLY QR NOERROR 35SECTION QUESTION 36www.example.com. IN A 37SECTION AUTHORITY 38com. IN NS a.gtld-servers.net. 39SECTION ADDITIONAL 40a.gtld-servers.net. IN A 192.5.6.30 41ENTRY_END 42RANGE_END 43 44; a.gtld-servers.net. 45RANGE_BEGIN 0 100 46 ADDRESS 192.5.6.30 47ENTRY_BEGIN 48MATCH opcode qtype qname 49ADJUST copy_id 50REPLY QR NOERROR 51SECTION QUESTION 52com. IN NS 53SECTION ANSWER 54com. IN NS a.gtld-servers.net. 55SECTION ADDITIONAL 56a.gtld-servers.net. IN A 192.5.6.30 57ENTRY_END 58 59ENTRY_BEGIN 60MATCH opcode qtype qname 61ADJUST copy_id 62REPLY QR NOERROR 63SECTION QUESTION 64www.example.com. IN A 65SECTION AUTHORITY 66example.com. IN NS ns.example.com. 67SECTION ADDITIONAL 68ns.example.com. IN A 1.2.3.4 69ENTRY_END 70RANGE_END 71 72; ns.example.com. 73RANGE_BEGIN 0 40 74 ADDRESS 1.2.3.4 75ENTRY_BEGIN 76MATCH opcode qtype qname 77ADJUST copy_id 78REPLY QR NOERROR 79SECTION QUESTION 80example.com. IN NS 81SECTION ANSWER 82example.com. IN NS ns.example.com. 83SECTION ADDITIONAL 84ns.example.com. IN A 1.2.3.4 85ENTRY_END 86 87ENTRY_BEGIN 88MATCH opcode qtype qname 89ADJUST copy_id 90REPLY QR NOERROR 91SECTION QUESTION 92www.example.com. IN A 93SECTION ANSWER 94www.example.com. 1800 IN A 10.20.30.40 95SECTION AUTHORITY 96example.com. 3600 IN NS ns.example.com. 97SECTION ADDITIONAL 98ns.example.com. 3600 IN A 1.2.3.4 99ENTRY_END 100RANGE_END 101 102; ns.example.com. 103RANGE_BEGIN 50 100 104 ADDRESS 1.2.3.4 105ENTRY_BEGIN 106MATCH opcode qtype qname 107ADJUST copy_id 108REPLY QR NOERROR 109SECTION QUESTION 110example.com. IN NS 111SECTION ANSWER 112example.com. IN NS ns.example.com. 113SECTION ADDITIONAL 114ns.example.com. IN A 1.2.3.4 115ENTRY_END 116 117ENTRY_BEGIN 118MATCH opcode qtype qname 119ADJUST copy_id 120REPLY QR NOERROR 121SECTION QUESTION 122www.example.com. IN A 123SECTION ANSWER 124www.example.com. 1800 IN A 10.20.30.40 125SECTION AUTHORITY 126example.com. 3600 IN NS ns.example.com. 127SECTION ADDITIONAL 128ns.example.com. 3600 IN A 1.2.3.4 129ENTRY_END 130RANGE_END 131 132STEP 1 QUERY 133ENTRY_BEGIN 134REPLY RD 135SECTION QUESTION 136www.example.com. IN A 137ENTRY_END 138 139; recursion happens here. 140STEP 10 CHECK_ANSWER 141ENTRY_BEGIN 142MATCH all ttl 143REPLY QR RD RA NOERROR 144SECTION QUESTION 145www.example.com. IN A 146SECTION ANSWER 147www.example.com. 1800 IN A 10.20.30.40 148SECTION AUTHORITY 149example.com. 3600 IN NS ns.example.com. 150SECTION ADDITIONAL 151ns.example.com. 3600 IN A 1.2.3.4 152ENTRY_END 153 154; after 900 secs still the cached answer 155STEP 20 TIME_PASSES ELAPSE 900 156 157STEP 30 QUERY 158ENTRY_BEGIN 159REPLY RD 160SECTION QUESTION 161www.example.com. IN A 162ENTRY_END 163; recursion happens here. 164STEP 40 CHECK_ANSWER 165ENTRY_BEGIN 166MATCH all ttl 167REPLY QR RD RA NOERROR 168SECTION QUESTION 169www.example.com. IN A 170SECTION ANSWER 171www.example.com. 900 IN A 10.20.30.40 172SECTION AUTHORITY 173example.com. 2700 IN NS ns.example.com. 174SECTION ADDITIONAL 175ns.example.com. 2700 IN A 1.2.3.4 176ENTRY_END 177 178; after 720 we are 180 seconds before the expiry 179; (the authority changes behind the scenes to detect new lookup) 180STEP 50 TIME_PASSES ELAPSE 720 181 182STEP 60 QUERY 183ENTRY_BEGIN 184REPLY RD 185SECTION QUESTION 186www.example.com. IN A 187ENTRY_END 188; recursion happens here. 189STEP 70 CHECK_ANSWER 190ENTRY_BEGIN 191MATCH all ttl 192REPLY QR RD RA NOERROR 193SECTION QUESTION 194www.example.com. IN A 195SECTION ANSWER 196www.example.com. 180 IN A 10.20.30.40 197SECTION AUTHORITY 198example.com. 1980 IN NS ns.example.com. 199SECTION ADDITIONAL 200ns.example.com. 1980 IN A 1.2.3.4 201ENTRY_END 202STEP 80 TRAFFIC 203; let traffic flow for prefetch to happen 204 205; above a cache reply with 10% of the original TTL 206; but the actual cache is changed, try to get that 207STEP 120 QUERY 208ENTRY_BEGIN 209REPLY RD 210SECTION QUESTION 211www.example.com. IN A 212ENTRY_END 213; recursion happens here. 214STEP 130 CHECK_ANSWER 215ENTRY_BEGIN 216MATCH all ttl 217REPLY QR RD RA NOERROR 218SECTION QUESTION 219www.example.com. IN A 220SECTION ANSWER 221www.example.com. 1800 IN A 10.20.30.40 222SECTION AUTHORITY 223; The NS rrset (from the child-side NS) is not updated but keeps counting down 224example.com. 1980 IN NS ns.example.com. 225SECTION ADDITIONAL 226ns.example.com. 1980 IN A 1.2.3.4 227ENTRY_END 228 229SCENARIO_END 230