xref: /netbsd-src/external/bsd/unbound/dist/testdata/auth_xfr_ixfr.rpl (revision 122b5006ee1bd67145794b4cde92f4fe4781a5ec)
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
39zup.example.com.	3600	IN	A	1.2.3.4
40yyy.example.com.	3600	IN	A	1.2.3.4
41yyy.example.com.	3600	IN	AAAA	2001:db8::5
42r1.example.com.	3600	IN	A	1.2.3.4
43r1.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
44r2.example.com.	3600	IN	A	1.2.3.4
45r2.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
46r2.example.com.	3600	IN	RRSIG	AAAA 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
47r3.example.com.	3600	IN	A	1.2.3.4
48r3.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
49r3.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 12345 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
50add.example.com.	3600	IN	A	1.2.3.4
51TEMPFILE_END
52
53stub-zone:
54	name: "."
55	stub-addr: 193.0.14.129 	# K.ROOT-SERVERS.NET.
56CONFIG_END
57
58SCENARIO_BEGIN Test authority zone with IXFR
59
60; K.ROOT-SERVERS.NET.
61RANGE_BEGIN 0 100
62	ADDRESS 193.0.14.129
63ENTRY_BEGIN
64MATCH opcode qtype qname
65ADJUST copy_id
66REPLY QR NOERROR
67SECTION QUESTION
68. IN NS
69SECTION ANSWER
70. IN NS	K.ROOT-SERVERS.NET.
71SECTION ADDITIONAL
72K.ROOT-SERVERS.NET.	IN	A	193.0.14.129
73ENTRY_END
74
75ENTRY_BEGIN
76MATCH opcode subdomain
77ADJUST copy_id copy_query
78REPLY QR NOERROR
79SECTION QUESTION
80com. IN NS
81SECTION AUTHORITY
82com.	IN NS	a.gtld-servers.net.
83SECTION ADDITIONAL
84a.gtld-servers.net.	IN 	A	192.5.6.30
85ENTRY_END
86RANGE_END
87
88; a.gtld-servers.net.
89RANGE_BEGIN 0 100
90	ADDRESS 192.5.6.30
91ENTRY_BEGIN
92MATCH opcode qtype qname
93ADJUST copy_id
94REPLY QR NOERROR
95SECTION QUESTION
96com. IN NS
97SECTION ANSWER
98com.	IN NS	a.gtld-servers.net.
99SECTION ADDITIONAL
100a.gtld-servers.net.	IN 	A	192.5.6.30
101ENTRY_END
102
103ENTRY_BEGIN
104MATCH opcode subdomain
105ADJUST copy_id copy_query
106REPLY QR NOERROR
107SECTION QUESTION
108example.com. IN NS
109SECTION AUTHORITY
110example.com.	IN NS	ns.example.com.
111SECTION ADDITIONAL
112ns.example.com. IN A 1.2.3.44
113ENTRY_END
114RANGE_END
115
116; ns.example.net.
117RANGE_BEGIN 0 100
118	ADDRESS 1.2.3.44
119ENTRY_BEGIN
120MATCH opcode qtype qname
121ADJUST copy_id
122REPLY QR NOERROR
123SECTION QUESTION
124example.net. IN NS
125SECTION ANSWER
126example.net.	IN NS	ns.example.net.
127SECTION ADDITIONAL
128ns.example.net.		IN 	A	1.2.3.44
129ENTRY_END
130
131ENTRY_BEGIN
132MATCH opcode qtype qname
133ADJUST copy_id
134REPLY QR NOERROR
135SECTION QUESTION
136ns.example.net. IN A
137SECTION ANSWER
138ns.example.net. IN A	1.2.3.44
139SECTION AUTHORITY
140example.net.	IN NS	ns.example.net.
141ENTRY_END
142
143ENTRY_BEGIN
144MATCH opcode qtype qname
145ADJUST copy_id
146REPLY QR NOERROR
147SECTION QUESTION
148ns.example.net. IN AAAA
149SECTION AUTHORITY
150example.net.	IN NS	ns.example.net.
151SECTION ADDITIONAL
152www.example.net. IN A	1.2.3.44
153ENTRY_END
154
155ENTRY_BEGIN
156MATCH opcode qtype qname
157ADJUST copy_id
158REPLY QR NOERROR
159SECTION QUESTION
160example.com. IN NS
161SECTION ANSWER
162example.com.	IN NS	ns.example.net.
163ENTRY_END
164
165ENTRY_BEGIN
166MATCH opcode qtype qname
167ADJUST copy_id
168REPLY QR NOERROR
169SECTION QUESTION
170www.example.com. IN A
171SECTION ANSWER
172www.example.com. IN A	10.20.30.40
173ENTRY_END
174
175ENTRY_BEGIN
176MATCH opcode qtype qname
177ADJUST copy_id
178REPLY QR NOERROR
179SECTION QUESTION
180example.com. IN SOA
181SECTION ANSWER
182; serial, refresh, retry, expire, minimum
183example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
184ENTRY_END
185
186ENTRY_BEGIN
187MATCH opcode qtype qname
188ADJUST copy_id
189REPLY QR AA NOERROR
190SECTION QUESTION
191example.com. IN IXFR
192SECTION ANSWER
193example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
194example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
195www.example.com. IN A	1.2.3.4
196mail.example.com.	3600	IN	A	1.2.3.6
197zup.example.com.	3600	IN	A	1.2.3.4
198yyy.example.com.	3600	IN	AAAA	2001:db8::5
199r1.example.com.	3600	IN	A	1.2.3.4
200r2.example.com.	3600	IN	A	1.2.3.4
201r3.example.com.	3600	IN	RRSIG A 8 3 10200 20170612005010 20170515005010 12345 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
202example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
203EXTRA_PACKET
204REPLY QR AA NOERROR
205SECTION QUESTION
206example.com. IN IXFR
207SECTION ANSWER
208www.example.com. IN A	1.2.3.5
209mail.example.com.	3600	IN	A	1.2.3.8
210mail.example.com. IN AAAA	2001:db8::5
211add2.example.com.	3600	IN	A	1.2.3.4
212example.com. IN SOA ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
213ENTRY_END
214RANGE_END
215
216STEP 1 QUERY
217ENTRY_BEGIN
218REPLY RD
219SECTION QUESTION
220www.example.com. IN A
221ENTRY_END
222STEP 2 TIME_PASSES ELAPSE 1
223
224; recursion happens here.
225STEP 20 CHECK_ANSWER
226ENTRY_BEGIN
227MATCH all
228REPLY QR AA RD RA NOERROR
229SECTION QUESTION
230www.example.com. IN A
231SECTION ANSWER
232www.example.com. IN A	1.2.3.4
233ENTRY_END
234
235STEP 30 TIME_PASSES ELAPSE 3600
236STEP 40 TRAFFIC
237
238STEP 50 QUERY
239ENTRY_BEGIN
240REPLY RD
241SECTION QUESTION
242www.example.com. IN A
243ENTRY_END
244
245; recursion happens here.
246STEP 60 CHECK_ANSWER
247ENTRY_BEGIN
248MATCH all
249REPLY QR AA RD RA NOERROR
250SECTION QUESTION
251www.example.com. IN A
252SECTION ANSWER
253www.example.com. IN A	1.2.3.5
254ENTRY_END
255
256; the zonefile was updated with new contents
257STEP 70 CHECK_TEMPFILE example.com
258FILE_BEGIN
259example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 2 3600 900 86400 3600
260example.com.	3600	IN	NS	ns.example.net.
261add.example.com.	3600	IN	A	1.2.3.4
262add2.example.com.	3600	IN	A	1.2.3.4
263mail.example.com.	3600	IN	A	1.2.3.4
264mail.example.com.	3600	IN	A	1.2.3.5
265mail.example.com.	3600	IN	A	1.2.3.7
266mail.example.com.	3600	IN	A	1.2.3.8
267mail.example.com.	3600	IN	AAAA	2001:db8::5
268r1.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
269r2.example.com.	3600	IN	RRSIG	AAAA 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
270r2.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
271r3.example.com.	3600	IN	A	1.2.3.4
272r3.example.com.	3600	IN	RRSIG	A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=
273www.example.com.	3600	IN	A	1.2.3.5
274yyy.example.com.	3600	IN	A	1.2.3.4
275FILE_END
276
277SCENARIO_END
278