xref: /netbsd-src/external/bsd/unbound/dist/testdata/auth_xfr_ixfrnotimpl.rpl (revision d90047b5d07facf36e6c01dcc0bded8997ce9cc2)
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	master: 1.2.3.44
13	## url for http fetch
14	## url:
15	## queries from downstream clients get authoritative answers.
16	## for-downstream: yes
17	for-downstream: yes
18	## queries are used to fetch authoritative answers from this zone,
19	## instead of unbound itself sending queries there.
20	## for-upstream: yes
21	for-upstream: yes
22	## on failures with for-upstream, fallback to sending queries to
23	## the authority servers
24	## fallback-enabled: no
25
26	## this line generates zonefile: \n"/tmp/xxx.example.com"\n
27	zonefile:
28TEMPFILE_NAME example.com
29	## this is the inline file /tmp/xxx.example.com
30	## the tempfiles are deleted when the testrun is over.
31TEMPFILE_CONTENTS example.com
32example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
33example.com.	3600	IN	NS	ns.example.net.
34www.example.com.	3600	IN	A	1.2.3.4
35mail.example.com.	3600	IN	A	1.2.3.4
36mail.example.com.	3600	IN	A	1.2.3.5
37mail.example.com.	3600	IN	A	1.2.3.6
38mail.example.com.	3600	IN	A	1.2.3.7
39TEMPFILE_END
40
41stub-zone:
42	name: "."
43	stub-addr: 193.0.14.129 	# K.ROOT-SERVERS.NET.
44CONFIG_END
45
46SCENARIO_BEGIN Test authority zone with IXFR NOTIMPL fallback
47
48; K.ROOT-SERVERS.NET.
49RANGE_BEGIN 0 100
50	ADDRESS 193.0.14.129
51ENTRY_BEGIN
52MATCH opcode qtype qname
53ADJUST copy_id
54REPLY QR NOERROR
55SECTION QUESTION
56. IN NS
57SECTION ANSWER
58. IN NS	K.ROOT-SERVERS.NET.
59SECTION ADDITIONAL
60K.ROOT-SERVERS.NET.	IN	A	193.0.14.129
61ENTRY_END
62
63ENTRY_BEGIN
64MATCH opcode subdomain
65ADJUST copy_id copy_query
66REPLY QR NOERROR
67SECTION QUESTION
68com. IN NS
69SECTION AUTHORITY
70com.	IN NS	a.gtld-servers.net.
71SECTION ADDITIONAL
72a.gtld-servers.net.	IN 	A	192.5.6.30
73ENTRY_END
74RANGE_END
75
76; a.gtld-servers.net.
77RANGE_BEGIN 0 100
78	ADDRESS 192.5.6.30
79ENTRY_BEGIN
80MATCH opcode qtype qname
81ADJUST copy_id
82REPLY QR NOERROR
83SECTION QUESTION
84com. IN NS
85SECTION ANSWER
86com.	IN NS	a.gtld-servers.net.
87SECTION ADDITIONAL
88a.gtld-servers.net.	IN 	A	192.5.6.30
89ENTRY_END
90
91ENTRY_BEGIN
92MATCH opcode subdomain
93ADJUST copy_id copy_query
94REPLY QR NOERROR
95SECTION QUESTION
96example.com. IN NS
97SECTION AUTHORITY
98example.com.	IN NS	ns.example.com.
99SECTION ADDITIONAL
100ns.example.com. IN A 1.2.3.44
101ENTRY_END
102RANGE_END
103
104; ns.example.net.
105RANGE_BEGIN 0 100
106	ADDRESS 1.2.3.44
107ENTRY_BEGIN
108MATCH opcode qtype qname
109ADJUST copy_id
110REPLY QR NOERROR
111SECTION QUESTION
112example.net. IN NS
113SECTION ANSWER
114example.net.	IN NS	ns.example.net.
115SECTION ADDITIONAL
116ns.example.net.		IN 	A	1.2.3.44
117ENTRY_END
118
119ENTRY_BEGIN
120MATCH opcode qtype qname
121ADJUST copy_id
122REPLY QR NOERROR
123SECTION QUESTION
124ns.example.net. IN A
125SECTION ANSWER
126ns.example.net. IN A	1.2.3.44
127SECTION AUTHORITY
128example.net.	IN NS	ns.example.net.
129ENTRY_END
130
131ENTRY_BEGIN
132MATCH opcode qtype qname
133ADJUST copy_id
134REPLY QR NOERROR
135SECTION QUESTION
136ns.example.net. IN AAAA
137SECTION AUTHORITY
138example.net.	IN NS	ns.example.net.
139SECTION ADDITIONAL
140www.example.net. IN A	1.2.3.44
141ENTRY_END
142
143ENTRY_BEGIN
144MATCH opcode qtype qname
145ADJUST copy_id
146REPLY QR NOERROR
147SECTION QUESTION
148example.com. IN NS
149SECTION ANSWER
150example.com.	IN NS	ns.example.net.
151ENTRY_END
152
153ENTRY_BEGIN
154MATCH opcode qtype qname
155ADJUST copy_id
156REPLY QR NOERROR
157SECTION QUESTION
158www.example.com. IN A
159SECTION ANSWER
160www.example.com. IN A	10.20.30.40
161ENTRY_END
162
163ENTRY_BEGIN
164MATCH opcode qtype qname
165ADJUST copy_id
166REPLY QR NOERROR
167SECTION QUESTION
168example.com. IN SOA
169SECTION ANSWER
170; serial, refresh, retry, expire, minimum
171example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
172ENTRY_END
173
174ENTRY_BEGIN
175MATCH opcode qtype qname
176ADJUST copy_id
177REPLY QR AA NOTIMPL
178SECTION QUESTION
179example.com. IN IXFR
180SECTION ANSWER
181ENTRY_END
182
183ENTRY_BEGIN
184MATCH opcode qtype qname
185ADJUST copy_id
186REPLY QR AA NOERROR
187SECTION QUESTION
188example.com. IN AXFR
189SECTION ANSWER
190example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
191example.com.	IN NS	ns.example.net.
192EXTRA_PACKET
193REPLY QR AA NOERROR
194SECTION QUESTION
195example.com. IN AXFR
196SECTION ANSWER
197www.example.com. IN A	1.2.3.6
198example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
199ENTRY_END
200RANGE_END
201
202STEP 1 QUERY
203ENTRY_BEGIN
204REPLY RD
205SECTION QUESTION
206www.example.com. IN A
207ENTRY_END
208STEP 2 TIME_PASSES ELAPSE 1
209
210; recursion happens here.
211STEP 20 CHECK_ANSWER
212ENTRY_BEGIN
213MATCH all
214REPLY QR AA RD RA NOERROR
215SECTION QUESTION
216www.example.com. IN A
217SECTION ANSWER
218www.example.com. IN A	1.2.3.4
219ENTRY_END
220
221STEP 30 TIME_PASSES ELAPSE 3600
222STEP 40 TRAFFIC
223
224STEP 50 QUERY
225ENTRY_BEGIN
226REPLY RD
227SECTION QUESTION
228www.example.com. IN A
229ENTRY_END
230
231; recursion happens here.
232STEP 60 CHECK_ANSWER
233ENTRY_BEGIN
234MATCH all
235REPLY QR AA RD RA NOERROR
236SECTION QUESTION
237www.example.com. IN A
238SECTION ANSWER
239www.example.com. IN A	1.2.3.6
240ENTRY_END
241
242; the zonefile was updated with new contents
243STEP 70 CHECK_TEMPFILE example.com
244FILE_BEGIN
245example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
246example.com.	3600	IN	NS	ns.example.net.
247www.example.com.	3600	IN	A	1.2.3.6
248FILE_END
249
250SCENARIO_END
251