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