]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/testdata/ttl_min.rpl
1fa7ef1c966993386266e3ff59cc30cc1b99cd7a
[apple/network_cmds.git] / unbound / testdata / ttl_min.rpl
1 ; config options
2 server:
3 access-control: 127.0.0.1 allow_snoop
4 cache-min-ttl: 10
5
6 stub-zone:
7 name: "."
8 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
9 CONFIG_END
10
11 SCENARIO_BEGIN Test TTL min option for messages in the cache
12
13 ; K.ROOT-SERVERS.NET.
14 RANGE_BEGIN 0 100
15 ADDRESS 193.0.14.129
16 ENTRY_BEGIN
17 MATCH opcode qtype qname
18 ADJUST copy_id
19 REPLY QR NOERROR
20 SECTION QUESTION
21 . IN NS
22 SECTION ANSWER
23 . IN NS K.ROOT-SERVERS.NET.
24 SECTION ADDITIONAL
25 K.ROOT-SERVERS.NET. IN A 193.0.14.129
26 ENTRY_END
27
28 ENTRY_BEGIN
29 MATCH opcode subdomain
30 ADJUST copy_id copy_query
31 REPLY QR NOERROR
32 SECTION QUESTION
33 com. IN A
34 SECTION AUTHORITY
35 com. IN NS a.gtld-servers.net.
36 SECTION ADDITIONAL
37 a.gtld-servers.net. IN A 192.5.6.30
38 ENTRY_END
39
40 ENTRY_BEGIN
41 MATCH opcode qtype qname
42 ADJUST copy_id
43 REPLY QR AA NOERROR
44 SECTION QUESTION
45 a.gtld-servers.net. IN A
46 SECTION ANSWER
47 a.gtld-servers.net. IN A 192.5.6.30
48 ENTRY_END
49
50 ENTRY_BEGIN
51 MATCH opcode qtype qname
52 ADJUST copy_id
53 REPLY QR AA NOERROR
54 SECTION QUESTION
55 K.ROOT-SERVERS.NET. IN A
56 SECTION ANSWER
57 K.ROOT-SERVERS.NET. IN A 193.0.14.129
58 ENTRY_END
59
60 ENTRY_BEGIN
61 MATCH opcode qtype qname
62 ADJUST copy_id
63 REPLY QR AA NOERROR
64 SECTION QUESTION
65 a.gtld-servers.net. IN AAAA
66 SECTION AUTHORITY
67 . 86400 IN SOA . . 20070304 28800 7200 604800 86400
68 ENTRY_END
69
70 ENTRY_BEGIN
71 MATCH opcode qtype qname
72 ADJUST copy_id
73 REPLY QR AA NOERROR
74 SECTION QUESTION
75 K.ROOT-SERVERS.NET. IN AAAA
76 SECTION AUTHORITY
77 . 86400 IN SOA . . 20070304 28800 7200 604800 86400
78 ENTRY_END
79
80 RANGE_END
81
82 ; a.gtld-servers.net.
83 RANGE_BEGIN 0 100
84 ADDRESS 192.5.6.30
85 ENTRY_BEGIN
86 MATCH opcode qtype qname
87 ADJUST copy_id
88 REPLY QR NOERROR
89 SECTION QUESTION
90 com. IN NS
91 SECTION ANSWER
92 com. IN NS a.gtld-servers.net.
93 SECTION ADDITIONAL
94 a.gtld-servers.net. IN A 192.5.6.30
95 ENTRY_END
96
97 ENTRY_BEGIN
98 MATCH opcode subdomain
99 ADJUST copy_id copy_query
100 REPLY QR NOERROR
101 SECTION QUESTION
102 example.com. IN A
103 SECTION AUTHORITY
104 example.com. IN NS ns.example.com.
105 SECTION ADDITIONAL
106 ns.example.com. IN A 1.2.3.4
107 ENTRY_END
108 RANGE_END
109
110 ; ns.example.com.
111 RANGE_BEGIN 0 100
112 ADDRESS 1.2.3.4
113 ENTRY_BEGIN
114 MATCH opcode qtype qname
115 ADJUST copy_id
116 REPLY QR NOERROR
117 SECTION QUESTION
118 example.com. IN NS
119 SECTION ANSWER
120 example.com. IN NS ns.example.com.
121 SECTION ADDITIONAL
122 ns.example.com. IN A 1.2.3.4
123 ENTRY_END
124
125 ENTRY_BEGIN
126 MATCH opcode qtype qname
127 ADJUST copy_id
128 REPLY QR AA NOERROR
129 SECTION QUESTION
130 ns.example.com. IN A
131 SECTION ANSWER
132 ns.example.com. IN A 1.2.3.4
133 SECTION AUTHORITY
134 example.com. IN NS ns.example.com.
135 ENTRY_END
136
137 ENTRY_BEGIN
138 MATCH opcode qtype qname
139 ADJUST copy_id
140 REPLY QR NOERROR
141 SECTION QUESTION
142 www.example.com. IN A
143 SECTION ANSWER
144 www.example.com. 5 IN A 10.20.30.40
145 SECTION AUTHORITY
146 example.com. IN NS ns.example.com.
147 SECTION ADDITIONAL
148 ns.example.com. IN A 1.2.3.4
149 ENTRY_END
150
151 ENTRY_BEGIN
152 MATCH opcode qtype qname
153 ADJUST copy_id
154 REPLY QR AA NOERROR
155 SECTION QUESTION
156 ns.example.com. IN AAAA
157 SECTION AUTHORITY
158 example.com. 10 IN SOA . . 15 28800 7200 604800 10
159 ENTRY_END
160
161 RANGE_END
162
163 ; start by passing time ; so we are not at 0
164 STEP 1 TIME_PASSES ELAPSE 10
165
166 ; query for the record
167 STEP 8 QUERY
168 ENTRY_BEGIN
169 REPLY RD CD
170 SECTION QUESTION
171 www.example.com. IN A
172 ENTRY_END
173
174 STEP 10 CHECK_ANSWER
175 ENTRY_BEGIN
176 MATCH all ttl
177 REPLY QR RD RA CD
178 SECTION QUESTION
179 www.example.com. IN A
180 SECTION ANSWER
181 www.example.com. 10 IN A 10.20.30.40
182 SECTION AUTHORITY
183 example.com. IN NS ns.example.com.
184 SECTION ADDITIONAL
185 ns.example.com. IN A 1.2.3.4
186 ENTRY_END
187
188 ; wait for 7 seconds
189 STEP 20 TIME_PASSES ELAPSE 7
190
191 ; do a lookup to check TTLs.
192 STEP 25 QUERY
193 ENTRY_BEGIN
194 REPLY
195 SECTION QUESTION
196 www.example.com. IN A
197 ENTRY_END
198
199 STEP 26 CHECK_ANSWER
200 ENTRY_BEGIN
201 MATCH all ttl
202 REPLY QR RA
203 SECTION QUESTION
204 www.example.com. IN A
205 SECTION ANSWER
206 www.example.com. 3 IN A 10.20.30.40
207 SECTION AUTHORITY
208 example.com. 3593 IN NS ns.example.com.
209 SECTION ADDITIONAL
210 ns.example.com. 3593 IN A 1.2.3.4
211 ENTRY_END
212
213 SCENARIO_END