]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/testdata/iter_fwdstubroot.rpl
e43584cbef1704aaba1ae00b367018fc3e812718
[apple/network_cmds.git] / unbound / testdata / iter_fwdstubroot.rpl
1 ; config options
2 server:
3 target-fetch-policy: "0 0 0 0 0"
4
5 stub-zone:
6 name: "."
7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
8 forward-zone:
9 name: "."
10 forward-addr: 10.0.0.1
11 stub-zone:
12 name: "sub.example.com"
13 stub-addr: 10.0.0.2
14 CONFIG_END
15
16 SCENARIO_BEGIN Test iterative resolve with a stub under a forward root zone
17
18 ; K.ROOT-SERVERS.NET.
19 RANGE_BEGIN 0 100
20 ADDRESS 193.0.14.129
21
22 ; No answers from the actual root, blocked.
23
24 RANGE_END
25
26 ; a.gtld-servers.net.
27 RANGE_BEGIN 0 100
28 ADDRESS 192.5.6.30
29 ENTRY_BEGIN
30 MATCH opcode qtype qname
31 ADJUST copy_id
32 REPLY QR NOERROR
33 SECTION QUESTION
34 com. IN NS
35 SECTION ANSWER
36 com. IN NS a.gtld-servers.net.
37 SECTION ADDITIONAL
38 a.gtld-servers.net. IN A 192.5.6.30
39 ENTRY_END
40
41 ENTRY_BEGIN
42 MATCH opcode qtype qname
43 ADJUST copy_id
44 REPLY QR NOERROR
45 SECTION QUESTION
46 www.example.com. IN A
47 SECTION AUTHORITY
48 example.com. IN NS ns.example.com.
49 SECTION ADDITIONAL
50 ns.example.com. IN A 1.2.3.4
51 ENTRY_END
52 RANGE_END
53
54 ; ns.example.com.
55 RANGE_BEGIN 0 100
56 ADDRESS 1.2.3.4
57 ENTRY_BEGIN
58 MATCH opcode qtype qname
59 ADJUST copy_id
60 REPLY QR NOERROR
61 SECTION QUESTION
62 example.com. IN NS
63 SECTION ANSWER
64 example.com. IN NS ns.example.com.
65 SECTION ADDITIONAL
66 ns.example.com. IN A 1.2.3.4
67 ENTRY_END
68
69 ENTRY_BEGIN
70 MATCH opcode qtype qname
71 ADJUST copy_id
72 REPLY QR NOERROR
73 SECTION QUESTION
74 www.example.com. IN A
75 SECTION ANSWER
76 www.example.com. IN A 10.20.30.40
77 SECTION AUTHORITY
78 example.com. IN NS ns.example.com.
79 SECTION ADDITIONAL
80 ns.example.com. IN A 1.2.3.4
81 ENTRY_END
82 RANGE_END
83
84 ; forwarder for example.com.
85 RANGE_BEGIN 0 100
86 ADDRESS 10.0.0.1
87 ENTRY_BEGIN
88 MATCH opcode qtype qname
89 ADJUST copy_id
90 REPLY QR NOERROR
91 SECTION QUESTION
92 example.com. IN NS
93 SECTION ANSWER
94 example.com. IN NS ns.example.com.
95 SECTION ADDITIONAL
96 ns.example.com. IN A 1.2.3.4
97 ENTRY_END
98
99 ENTRY_BEGIN
100 MATCH opcode qtype qname
101 ADJUST copy_id
102 REPLY QR NOERROR
103 SECTION QUESTION
104 www.example.com. IN A
105 SECTION ANSWER
106 www.example.com. IN A 10.0.0.4
107 SECTION AUTHORITY
108 example.com. IN NS ns.example.com.
109 SECTION ADDITIONAL
110 ns.example.com. IN A 1.2.3.4
111 ENTRY_END
112
113 ; fail all other queries
114 ENTRY_BEGIN
115 MATCH opcode
116 ADJUST copy_id copy_query
117 REPLY QR SERVFAIL
118 SECTION QUESTION
119 example.com. IN A
120 ENTRY_END
121 RANGE_END
122
123 ; stub for sub.example.com.
124 RANGE_BEGIN 0 100
125 ADDRESS 10.0.0.2
126 ENTRY_BEGIN
127 MATCH opcode qtype qname
128 ADJUST copy_id
129 REPLY QR NOERROR
130 SECTION QUESTION
131 sub.example.com. IN NS
132 SECTION ANSWER
133 sub.example.com. IN NS ns.sub.example.com.
134 SECTION ADDITIONAL
135 ns.sub.example.com. IN A 1.2.3.44
136 ENTRY_END
137
138 ENTRY_BEGIN
139 MATCH opcode qtype qname
140 ADJUST copy_id
141 REPLY QR NOERROR
142 SECTION QUESTION
143 www.sub.example.com. IN A
144 SECTION ANSWER
145 www.sub.example.com. IN A 10.0.0.5
146 SECTION AUTHORITY
147 sub.example.com. IN NS ns.sub.example.com.
148 SECTION ADDITIONAL
149 ns.sub.example.com. IN A 1.2.3.44
150 ENTRY_END
151 RANGE_END
152
153 ; try to resolve from stub zone
154 STEP 20 QUERY
155 ENTRY_BEGIN
156 REPLY RD
157 SECTION QUESTION
158 www.sub.example.com. IN A
159 ENTRY_END
160
161 STEP 30 CHECK_ANSWER
162 ENTRY_BEGIN
163 MATCH all
164 REPLY QR RD RA NOERROR
165 SECTION QUESTION
166 www.sub.example.com. IN A
167 SECTION ANSWER
168 www.sub.example.com. IN A 10.0.0.5
169 SECTION AUTHORITY
170 sub.example.com. IN NS ns.sub.example.com.
171 SECTION ADDITIONAL
172 ns.sub.example.com. IN A 1.2.3.44
173 ENTRY_END
174
175 SCENARIO_END