1; config options 2server: 3 target-fetch-policy: "0 0 0 0 0" 4 5auth-zone: 6 name: "example.com." 7 ## zonefile (or none). 8 ## zonefile: "example.com.zone" 9 ## master by IP address or hostname 10 ## can list multiple masters, each on one line. 11 ## master: 12 ## url for http fetch 13 ## url: 14 ## queries from downstream clients get authoritative answers. 15 ## for-downstream: yes 16 for-downstream: no 17 ## queries are used to fetch authoritative answers from this zone, 18 ## instead of unbound itself sending queries there. 19 ## for-upstream: yes 20 for-upstream: no 21 ## on failures with for-upstream, fallback to sending queries to 22 ## the authority servers 23 ## fallback-enabled: no 24 25 ## this line generates zonefile: \n"/tmp/xxx.example.com"\n 26 zonefile: 27TEMPFILE_NAME example.com 28 ## this is the inline file /tmp/xxx.example.com 29 ## the tempfiles are deleted when the testrun is over. 30TEMPFILE_CONTENTS example.com 31$ORIGIN com. 32example 3600 IN SOA dns.example.de. hostmaster.dns.example.de. ( 33 1379078166 28800 7200 604800 7200 ) 34 3600 IN NS ns1.example.com. 35 3600 IN NS ns2.example.com. 36$ORIGIN example.com. 37www 3600 IN A 1.2.3.4 38ns1 3600 IN A 1.2.3.4 39ns2 3600 IN AAAA ::2 40TEMPFILE_END 41 42stub-zone: 43 name: "." 44 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 45CONFIG_END 46 47SCENARIO_BEGIN Test authority zone with zonefile with no upstream enabled 48; and therefore fallback is going to be used. 49 50; K.ROOT-SERVERS.NET. 51RANGE_BEGIN 0 100 52 ADDRESS 193.0.14.129 53ENTRY_BEGIN 54MATCH opcode qtype qname 55ADJUST copy_id 56REPLY QR NOERROR 57SECTION QUESTION 58. IN NS 59SECTION ANSWER 60. IN NS K.ROOT-SERVERS.NET. 61SECTION ADDITIONAL 62K.ROOT-SERVERS.NET. IN A 193.0.14.129 63ENTRY_END 64 65ENTRY_BEGIN 66MATCH opcode subdomain 67ADJUST copy_id copy_query 68REPLY QR NOERROR 69SECTION QUESTION 70com. IN NS 71SECTION AUTHORITY 72com. IN NS a.gtld-servers.net. 73SECTION ADDITIONAL 74a.gtld-servers.net. IN A 192.5.6.30 75ENTRY_END 76RANGE_END 77 78; a.gtld-servers.net. 79RANGE_BEGIN 0 100 80 ADDRESS 192.5.6.30 81ENTRY_BEGIN 82MATCH opcode qtype qname 83ADJUST copy_id 84REPLY QR NOERROR 85SECTION QUESTION 86com. IN NS 87SECTION ANSWER 88com. IN NS a.gtld-servers.net. 89SECTION ADDITIONAL 90a.gtld-servers.net. IN A 192.5.6.30 91ENTRY_END 92 93ENTRY_BEGIN 94MATCH opcode subdomain 95ADJUST copy_id copy_query 96REPLY QR NOERROR 97SECTION QUESTION 98example.com. IN NS 99SECTION AUTHORITY 100example.com. IN NS ns.example.com. 101SECTION ADDITIONAL 102ns.example.com. IN A 1.2.3.44 103ENTRY_END 104RANGE_END 105 106; ns.example.net. 107RANGE_BEGIN 0 100 108 ADDRESS 1.2.3.44 109ENTRY_BEGIN 110MATCH opcode qtype qname 111ADJUST copy_id 112REPLY QR NOERROR 113SECTION QUESTION 114example.net. IN NS 115SECTION ANSWER 116example.net. IN NS ns.example.net. 117SECTION ADDITIONAL 118ns.example.net. IN A 1.2.3.44 119ENTRY_END 120 121ENTRY_BEGIN 122MATCH opcode qtype qname 123ADJUST copy_id 124REPLY QR NOERROR 125SECTION QUESTION 126ns.example.net. IN A 127SECTION ANSWER 128ns.example.net. IN A 1.2.3.44 129SECTION AUTHORITY 130example.net. IN NS ns.example.net. 131ENTRY_END 132 133ENTRY_BEGIN 134MATCH opcode qtype qname 135ADJUST copy_id 136REPLY QR NOERROR 137SECTION QUESTION 138ns.example.net. IN AAAA 139SECTION AUTHORITY 140example.net. IN NS ns.example.net. 141SECTION ADDITIONAL 142www.example.net. IN A 1.2.3.44 143ENTRY_END 144 145ENTRY_BEGIN 146MATCH opcode qtype qname 147ADJUST copy_id 148REPLY QR NOERROR 149SECTION QUESTION 150example.com. IN NS 151SECTION ANSWER 152example.com. IN NS ns.example.net. 153ENTRY_END 154 155ENTRY_BEGIN 156MATCH opcode qtype qname 157ADJUST copy_id 158REPLY QR NOERROR 159SECTION QUESTION 160www.example.com. IN A 161SECTION ANSWER 162www.example.com. IN A 10.20.30.40 163ENTRY_END 164RANGE_END 165 166STEP 1 QUERY 167ENTRY_BEGIN 168REPLY RD 169SECTION QUESTION 170www.example.com. IN A 171ENTRY_END 172 173; recursion happens here. 174STEP 20 CHECK_ANSWER 175ENTRY_BEGIN 176MATCH all 177REPLY QR RD RA NOERROR 178SECTION QUESTION 179www.example.com. IN A 180SECTION ANSWER 181www.example.com. IN A 10.20.30.40 182ENTRY_END 183 184SCENARIO_END 185