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: yes 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 38mail 3600 IN A 1.2.3.5 39 3600 IN AAAA ::5 40ns1 3600 IN A 1.2.3.4 41ns2 3600 IN AAAA ::2 42$INCLUDE_TEMPFILE example.inc 43TEMPFILE_END 44TEMPFILE_CONTENTS example.inc 45other 7200 IN A 1.2.3.6 46TEMPFILE_END 47 48stub-zone: 49 name: "." 50 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET. 51CONFIG_END 52 53SCENARIO_BEGIN Test authority zone with zonefile 54 55; K.ROOT-SERVERS.NET. 56RANGE_BEGIN 0 100 57 ADDRESS 193.0.14.129 58ENTRY_BEGIN 59MATCH opcode qtype qname 60ADJUST copy_id 61REPLY QR NOERROR 62SECTION QUESTION 63. IN NS 64SECTION ANSWER 65. IN NS K.ROOT-SERVERS.NET. 66SECTION ADDITIONAL 67K.ROOT-SERVERS.NET. IN A 193.0.14.129 68ENTRY_END 69 70ENTRY_BEGIN 71MATCH opcode subdomain 72ADJUST copy_id copy_query 73REPLY QR NOERROR 74SECTION QUESTION 75com. IN NS 76SECTION AUTHORITY 77com. IN NS a.gtld-servers.net. 78SECTION ADDITIONAL 79a.gtld-servers.net. IN A 192.5.6.30 80ENTRY_END 81RANGE_END 82 83; a.gtld-servers.net. 84RANGE_BEGIN 0 100 85 ADDRESS 192.5.6.30 86ENTRY_BEGIN 87MATCH opcode qtype qname 88ADJUST copy_id 89REPLY QR NOERROR 90SECTION QUESTION 91com. IN NS 92SECTION ANSWER 93com. IN NS a.gtld-servers.net. 94SECTION ADDITIONAL 95a.gtld-servers.net. IN A 192.5.6.30 96ENTRY_END 97 98ENTRY_BEGIN 99MATCH opcode subdomain 100ADJUST copy_id copy_query 101REPLY QR NOERROR 102SECTION QUESTION 103example.com. IN NS 104SECTION AUTHORITY 105example.com. IN NS ns.example.com. 106SECTION ADDITIONAL 107ns.example.com. IN A 1.2.3.44 108ENTRY_END 109RANGE_END 110 111; ns.example.net. 112RANGE_BEGIN 0 100 113 ADDRESS 1.2.3.44 114ENTRY_BEGIN 115MATCH opcode qtype qname 116ADJUST copy_id 117REPLY QR NOERROR 118SECTION QUESTION 119example.net. IN NS 120SECTION ANSWER 121example.net. IN NS ns.example.net. 122SECTION ADDITIONAL 123ns.example.net. IN A 1.2.3.44 124ENTRY_END 125 126ENTRY_BEGIN 127MATCH opcode qtype qname 128ADJUST copy_id 129REPLY QR NOERROR 130SECTION QUESTION 131ns.example.net. IN A 132SECTION ANSWER 133ns.example.net. IN A 1.2.3.44 134SECTION AUTHORITY 135example.net. IN NS ns.example.net. 136ENTRY_END 137 138ENTRY_BEGIN 139MATCH opcode qtype qname 140ADJUST copy_id 141REPLY QR NOERROR 142SECTION QUESTION 143ns.example.net. IN AAAA 144SECTION AUTHORITY 145example.net. IN NS ns.example.net. 146SECTION ADDITIONAL 147www.example.net. IN A 1.2.3.44 148ENTRY_END 149 150ENTRY_BEGIN 151MATCH opcode qtype qname 152ADJUST copy_id 153REPLY QR NOERROR 154SECTION QUESTION 155example.com. IN NS 156SECTION ANSWER 157example.com. IN NS ns.example.net. 158ENTRY_END 159 160ENTRY_BEGIN 161MATCH opcode qtype qname 162ADJUST copy_id 163REPLY QR NOERROR 164SECTION QUESTION 165www.example.com. IN A 166SECTION ANSWER 167www.example.com. IN A 10.20.30.40 168ENTRY_END 169RANGE_END 170 171STEP 1 QUERY 172ENTRY_BEGIN 173REPLY RD 174SECTION QUESTION 175www.example.com. IN A 176ENTRY_END 177 178; recursion happens here. 179STEP 20 CHECK_ANSWER 180ENTRY_BEGIN 181MATCH all 182REPLY QR RD RA NOERROR 183SECTION QUESTION 184www.example.com. IN A 185SECTION ANSWER 186www.example.com. IN A 1.2.3.4 187ENTRY_END 188 189SCENARIO_END 190