Debian Codegraph @

keama/tests/samples/example.json

raw
1 {
2 # dhcpd.conf
3 #
4 # Sample configuration file for ISC dhcpd
5 #
6 # option definitions common to all supported networks...
7 /// This configuration declares some subnets but has no interfaces-config
8 /// Reference Kea #245
9 "Dhcp4": {
10 "option-data": [
11 {
12 "space": "dhcp4",
13 "name": "domain-name",
14 "code": 15,
15 "data": "example.org"
16 },
17 #option domain-name-servers ns1.example.org, ns2.example.org;
18 {
19 "space": "dhcp4",
20 "name": "domain-name-servers",
21 "code": 6,
22 "data": "10.35.0.1, 10.35.0.2"
23 }
24 ],
25 "valid-lifetime": 600,
26 "max-valid-lifetime": 7200,
27 // "config": [
28 // /// log-facility is not supported
29 // /// Please use the KEA_LOGGER_DESTINATION environment variable instead
30 // {
31 // "name": "log-facility",
32 // "code": 44,
33 // "value": "local7"
34 // }
35 // ],
36 "subnet4": [
37 # No service will be given on this subnet, but declaring it helps the
38 # DHCP server to understand the network topology.
39 {
40 "id": 1,
41 "subnet": "10.152.187.0/24"
42 },
43 # This is a very basic subnet declaration.
44 {
45 "id": 2,
46 "subnet": "10.254.239.0/27",
47 "pools": [
48 {
49 "pool": "10.254.239.10 - 10.254.239.20"
50 }
51 ],
52 "option-data": [
53 # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
54 {
55 "space": "dhcp4",
56 "name": "routers",
57 "code": 3,
58 "data": "10.254.239.1, 10.254.239.2"
59 }
60 ]
61 },
62 # This declaration allows BOOTP clients to get dynamic addresses,
63 # which we don't really recommend.
64 {
65 "id": 3,
66 "subnet": "10.254.239.32/27",
67 "pools": [
68 {
69 "pool": "10.254.239.40 - 10.254.239.60"
70 }
71 ],
72 "option-data": [
73 {
74 "space": "dhcp4",
75 "name": "broadcast-address",
76 "code": 28,
77 "data": "10.254.239.31"
78 },
79 # option routers rtr-239-32-1.example.org;
80 {
81 "space": "dhcp4",
82 "name": "routers",
83 "code": 3,
84 "data": "10.254.239.33"
85 }
86 ]
87 },
88 # A slightly different configuration for an internal subnet.
89 {
90 "id": 4,
91 "subnet": "10.5.5.0/27",
92 "pools": [
93 {
94 "pool": "10.5.5.26 - 10.5.5.30"
95 }
96 ],
97 "option-data": [
98 # option domain-name-servers ns1.internal.example.org;
99 {
100 "space": "dhcp4",
101 "name": "domain-name-servers",
102 "code": 6,
103 "data": "10.35.1.1"
104 },
105 {
106 "space": "dhcp4",
107 "name": "domain-name",
108 "code": 15,
109 "data": "internal.example.org"
110 },
111 {
112 "space": "dhcp4",
113 "name": "routers",
114 "code": 3,
115 "data": "10.5.5.1"
116 },
117 {
118 "space": "dhcp4",
119 "name": "broadcast-address",
120 "code": 28,
121 "data": "10.5.5.31"
122 }
123 ],
124 "valid-lifetime": 600,
125 "max-valid-lifetime": 7200,
126 /// Host reservations without fixed addresses were put in the last declared subnet
127 /// Reference Kea #231
128 "reservations": [
129 # Hosts which require special configuration options can be listed in
130 # host statements. If no address is specified, the address will be
131 # allocated dynamically (if possible), but the host-specific information
132 # will still come from the host declaration.
133 {
134 "hostname": "passacaglia",
135 "hw-address": "00:00:c0:5d:bd:95",
136 "boot-file-name": "vmunix.passacaglia",
137 "server-hostname": "toccata.example.com"
138 },
139 # Fixed IP addresses can also be specified for hosts. These addresses
140 # should not also be listed as being available for dynamic assignment.
141 # Hosts for which fixed IP addresses have been specified can boot using
142 # BOOTP or DHCP. Hosts for which no fixed address is specified can only
143 # be booted with DHCP, unless there is an address range on the subnet
144 # to which a BOOTP client is connected which has the dynamic-bootp flag
145 # set.
146 {
147 "hostname": "fantasia",
148 "hw-address": "08:00:07:26:c0:a5",
149 "ip-address": "10.5.5.20"
150 }
151 ]
152 }
153 ],
154 "host-reservation-identifiers": [
155 "hw-address"
156 ],
157 "client-classes": [
158 # You can declare a class of clients and then do address allocation
159 # based on that. The example below shows a case where all clients
160 # in a certain class get addresses on the 10.17.224/24 subnet, and all
161 # other clients get addresses on the 10.0.29/24 subnet.
162 {
163 "name": "foo",
164 /// from: match if (substring(option dhcp.vendor-class-identifier, 0, 4)) = 'SUNW'
165 "test": "substring(option[60].hex,0,4) == 'SUNW'"
166 },
167 {
168 "name": "gen#_AND_#!foo#",
169 "test": "not member('foo')"
170 }
171 ],
172 /// Kea shared-networks are different, cf Kea #236
173 "shared-networks": [
174 {
175 "name": "224-29",
176 "subnet4": [
177 {
178 "id": 5,
179 "subnet": "10.17.224.0/24",
180 "option-data": [
181 # option routers rtr-224.example.org;
182 {
183 "space": "dhcp4",
184 "name": "routers",
185 "code": 3,
186 "data": "10.17.224.1"
187 }
188 ],
189 "pools": [
190 {
191 "pool": "10.17.224.10 - 10.17.224.250",
192 /// From:
193 /// allow foo
194 "client-class": "foo"
195 }
196 ]
197 },
198 {
199 "id": 6,
200 "subnet": "10.0.29.0/24",
201 "option-data": [
202 # option routers rtr-29.example.org;
203 {
204 "space": "dhcp4",
205 "name": "routers",
206 "code": 3,
207 "data": "10.0.29.1"
208 }
209 ],
210 "pools": [
211 {
212 "pool": "10.0.29.10 - 10.0.29.230",
213 /// From:
214 /// deny foo
215 "client-class": "gen#_AND_#!foo#"
216 }
217 ]
218 }
219 ]
220 }
221 ]
222 }
223 }