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 of almost expired data 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 qtype qname 32ADJUST copy_id 33REPLY QR NOERROR 34SECTION QUESTION 35www.example.com. 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. 44RANGE_BEGIN 0 100 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 qtype qname 60ADJUST copy_id 61REPLY QR NOERROR 62SECTION QUESTION 63www.example.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; ns.example.com. 72RANGE_BEGIN 0 40 73 ADDRESS 1.2.3.4 74ENTRY_BEGIN 75MATCH opcode qtype qname 76ADJUST copy_id 77REPLY QR NOERROR 78SECTION QUESTION 79example.com. IN NS 80SECTION ANSWER 81example.com. IN NS ns.example.com. 82SECTION ADDITIONAL 83ns.example.com. IN A 1.2.3.4 84ENTRY_END 85 86ENTRY_BEGIN 87MATCH opcode qtype qname 88ADJUST copy_id 89REPLY QR NOERROR 90SECTION QUESTION 91www.example.com. IN A 92SECTION ANSWER 93www.example.com. 3600 IN A 10.20.30.40 94SECTION AUTHORITY 95example.com. 3600 IN NS ns.example.com. 96SECTION ADDITIONAL 97ns.example.com. 3600 IN A 1.2.3.4 98ENTRY_END 99RANGE_END 100 101; ns.example.com. 102RANGE_BEGIN 50 100 103 ADDRESS 1.2.3.4 104ENTRY_BEGIN 105MATCH opcode qtype qname 106ADJUST copy_id 107REPLY QR NOERROR 108SECTION QUESTION 109example.com. IN NS 110SECTION ANSWER 111example.com. IN NS ns.example.com. 112SECTION ADDITIONAL 113ns.example.com. IN A 1.2.3.4 114ENTRY_END 115 116ENTRY_BEGIN 117MATCH opcode qtype qname 118ADJUST copy_id 119REPLY QR NOERROR 120SECTION QUESTION 121www.example.com. IN A 122SECTION ANSWER 123www.example.com. 3600 IN A 10.20.30.40 124SECTION AUTHORITY 125example.com. 3600 IN NS ns.example.com. 126SECTION ADDITIONAL 127ns.example.com. 3600 IN A 1.2.3.4 128ENTRY_END 129RANGE_END 130 131STEP 1 QUERY 132ENTRY_BEGIN 133REPLY RD 134SECTION QUESTION 135www.example.com. IN A 136ENTRY_END 137 138; recursion happens here. 139STEP 10 CHECK_ANSWER 140ENTRY_BEGIN 141MATCH all ttl 142REPLY QR RD RA NOERROR 143SECTION QUESTION 144www.example.com. IN A 145SECTION ANSWER 146www.example.com. 3600 IN A 10.20.30.40 147SECTION AUTHORITY 148example.com. 3600 IN NS ns.example.com. 149SECTION ADDITIONAL 150ns.example.com. 3600 IN A 1.2.3.4 151ENTRY_END 152 153; after 1800 secs still the cached answer 154STEP 20 TIME_PASSES ELAPSE 1800 155 156STEP 30 QUERY 157ENTRY_BEGIN 158REPLY RD 159SECTION QUESTION 160www.example.com. IN A 161ENTRY_END 162; recursion happens here. 163STEP 40 CHECK_ANSWER 164ENTRY_BEGIN 165MATCH all ttl 166REPLY QR RD RA NOERROR 167SECTION QUESTION 168www.example.com. IN A 169SECTION ANSWER 170www.example.com. 1800 IN A 10.20.30.40 171SECTION AUTHORITY 172example.com. 1800 IN NS ns.example.com. 173SECTION ADDITIONAL 174ns.example.com. 1800 IN A 1.2.3.4 175ENTRY_END 176 177; after 1440 we are 360 seconds before the expiry 178; (the authority changes behind the scenes to detect new lookup) 179STEP 50 TIME_PASSES ELAPSE 1440 180 181STEP 60 QUERY 182ENTRY_BEGIN 183REPLY RD 184SECTION QUESTION 185www.example.com. IN A 186ENTRY_END 187; recursion happens here. 188STEP 70 CHECK_ANSWER 189ENTRY_BEGIN 190MATCH all ttl 191REPLY QR RD RA NOERROR 192SECTION QUESTION 193www.example.com. IN A 194SECTION ANSWER 195www.example.com. 360 IN A 10.20.30.40 196SECTION AUTHORITY 197example.com. 360 IN NS ns.example.com. 198SECTION ADDITIONAL 199ns.example.com. 360 IN A 1.2.3.4 200ENTRY_END 201STEP 80 TRAFFIC 202; let traffic flow for prefetch to happen 203 204; above a cache reply with 10% of the original TTL 205; but the actual cache is changed, try to get that 206STEP 120 QUERY 207ENTRY_BEGIN 208REPLY RD 209SECTION QUESTION 210www.example.com. IN A 211ENTRY_END 212; recursion happens here. 213STEP 130 CHECK_ANSWER 214ENTRY_BEGIN 215MATCH all ttl 216REPLY QR RD RA NOERROR 217SECTION QUESTION 218www.example.com. IN A 219SECTION ANSWER 220www.example.com. 3600 IN A 10.20.30.40 221SECTION AUTHORITY 222; NS rrset picked up from parent-NS (the child-NS timed out at now+prefetch) 223example.com. 3600 IN NS ns.example.com. 224SECTION ADDITIONAL 225ns.example.com. 3600 IN A 1.2.3.4 226ENTRY_END 227 228SCENARIO_END 229