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