xref: /netbsd-src/external/bsd/unbound/dist/testdata/auth_xfr_probesoa.rpl (revision 867d70fc718005c0918b8b8b2f9d7f2d52d0a0db)
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
35TEMPFILE_END
36
37stub-zone:
38	name: "."
39	stub-addr: 193.0.14.129 	# K.ROOT-SERVERS.NET.
40CONFIG_END
41
42SCENARIO_BEGIN Test authority zone with probe of SOA
43
44; K.ROOT-SERVERS.NET.
45RANGE_BEGIN 0 100
46	ADDRESS 193.0.14.129
47ENTRY_BEGIN
48MATCH opcode qtype qname
49ADJUST copy_id
50REPLY QR NOERROR
51SECTION QUESTION
52. IN NS
53SECTION ANSWER
54. IN NS	K.ROOT-SERVERS.NET.
55SECTION ADDITIONAL
56K.ROOT-SERVERS.NET.	IN	A	193.0.14.129
57ENTRY_END
58
59ENTRY_BEGIN
60MATCH opcode subdomain
61ADJUST copy_id copy_query
62REPLY QR NOERROR
63SECTION QUESTION
64com. IN NS
65SECTION AUTHORITY
66com.	IN NS	a.gtld-servers.net.
67SECTION ADDITIONAL
68a.gtld-servers.net.	IN 	A	192.5.6.30
69ENTRY_END
70RANGE_END
71
72; a.gtld-servers.net.
73RANGE_BEGIN 0 100
74	ADDRESS 192.5.6.30
75ENTRY_BEGIN
76MATCH opcode qtype qname
77ADJUST copy_id
78REPLY QR NOERROR
79SECTION QUESTION
80com. IN NS
81SECTION ANSWER
82com.	IN NS	a.gtld-servers.net.
83SECTION ADDITIONAL
84a.gtld-servers.net.	IN 	A	192.5.6.30
85ENTRY_END
86
87ENTRY_BEGIN
88MATCH opcode subdomain
89ADJUST copy_id copy_query
90REPLY QR NOERROR
91SECTION QUESTION
92example.com. IN NS
93SECTION AUTHORITY
94example.com.	IN NS	ns.example.com.
95SECTION ADDITIONAL
96ns.example.com. IN A 1.2.3.44
97ENTRY_END
98RANGE_END
99
100; ns.example.net.
101RANGE_BEGIN 0 100
102	ADDRESS 1.2.3.44
103ENTRY_BEGIN
104MATCH opcode qtype qname
105ADJUST copy_id
106REPLY QR NOERROR
107SECTION QUESTION
108example.net. IN NS
109SECTION ANSWER
110example.net.	IN NS	ns.example.net.
111SECTION ADDITIONAL
112ns.example.net.		IN 	A	1.2.3.44
113ENTRY_END
114
115ENTRY_BEGIN
116MATCH opcode qtype qname
117ADJUST copy_id
118REPLY QR NOERROR
119SECTION QUESTION
120ns.example.net. IN A
121SECTION ANSWER
122ns.example.net. IN A	1.2.3.44
123SECTION AUTHORITY
124example.net.	IN NS	ns.example.net.
125ENTRY_END
126
127ENTRY_BEGIN
128MATCH opcode qtype qname
129ADJUST copy_id
130REPLY QR NOERROR
131SECTION QUESTION
132ns.example.net. IN AAAA
133SECTION AUTHORITY
134example.net.	IN NS	ns.example.net.
135SECTION ADDITIONAL
136www.example.net. IN A	1.2.3.44
137ENTRY_END
138
139ENTRY_BEGIN
140MATCH opcode qtype qname
141ADJUST copy_id
142REPLY QR NOERROR
143SECTION QUESTION
144example.com. IN NS
145SECTION ANSWER
146example.com.	IN NS	ns.example.net.
147ENTRY_END
148
149ENTRY_BEGIN
150MATCH opcode qtype qname
151ADJUST copy_id
152REPLY QR NOERROR
153SECTION QUESTION
154www.example.com. IN A
155SECTION ANSWER
156www.example.com. IN A	10.20.30.40
157ENTRY_END
158
159ENTRY_BEGIN
160MATCH opcode qtype qname
161ADJUST copy_id
162REPLY QR NOERROR
163SECTION QUESTION
164example.com. IN SOA
165SECTION ANSWER
166; serial, refresh, retry, expire, minimum
167example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
168ENTRY_END
169
170RANGE_END
171
172STEP 1 QUERY
173ENTRY_BEGIN
174REPLY RD
175SECTION QUESTION
176www.example.com. IN A
177ENTRY_END
178
179; recursion happens here.
180STEP 20 CHECK_ANSWER
181ENTRY_BEGIN
182MATCH all
183REPLY QR AA RD RA NOERROR
184SECTION QUESTION
185www.example.com. IN A
186SECTION ANSWER
187www.example.com. IN A	1.2.3.4
188ENTRY_END
189
190STEP 30 TIME_PASSES ELAPSE 3600
191STEP 40 TRAFFIC
192
193STEP 50 QUERY
194ENTRY_BEGIN
195REPLY RD
196SECTION QUESTION
197www.example.com. IN A
198ENTRY_END
199
200; recursion happens here.
201STEP 60 CHECK_ANSWER
202ENTRY_BEGIN
203MATCH all
204REPLY QR AA RD RA NOERROR
205SECTION QUESTION
206www.example.com. IN A
207SECTION ANSWER
208www.example.com. IN A	1.2.3.4
209ENTRY_END
210
211; the zonefile was updated with new contents
212STEP 70 CHECK_TEMPFILE example.com
213FILE_BEGIN
214example.com.	3600	IN	SOA	ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600
215example.com.	3600	IN	NS	ns.example.net.
216www.example.com.	3600	IN	A	1.2.3.4
217FILE_END
218
219SCENARIO_END
220