summaryrefslogtreecommitdiff
path: root/interface-definitions/dhcp-server.xml.in
blob: 6e15922009f6a2858db286166b7b7d52d3aae034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<?xml version="1.0"?>
<!-- DHCP server configuration -->
<interfaceDefinition>
  <node name="service">
    <children>
      <node name="dhcp-server" owner="${vyos_conf_scripts_dir}/dhcp_server.py">
        <properties>
          <help>Dynamic Host Configuration Protocol (DHCP) for DHCP server</help>
          <priority>911</priority>
        </properties>
        <children>
          #include <include/generic-disable-node.xml.i>
          <leafNode name="dynamic-dns-update">
            <properties>
              <help>Dynamically update Domain Name System (RFC4702)</help>
              <valueless/>
            </properties>
          </leafNode>
          <node name="failover">
            <properties>
              <help>DHCP failover configuration</help>
            </properties>
            <children>
              #include <include/source-address-ipv4.xml.i>
              <leafNode name="remote">
                <properties>
                  <help>IPv4 remote address used for connectio</help>
                  <valueHelp>
                    <format>ipv4</format>
                    <description>IPv4 address of failover peer</description>
                  </valueHelp>
                  <constraint>
                    <validator name="ipv4-address"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="name">
                <properties>
                  <help>Peer name used to identify connection</help>
                  <constraint>
                    <regex>[-_a-zA-Z0-9.]+</regex>
                  </constraint>
                  <constraintErrorMessage>Invalid failover peer name. May only contain letters, numbers and .-_</constraintErrorMessage>
                </properties>
              </leafNode>
              <leafNode name="status">
                <properties>
                  <help>Failover hierarchy</help>
                  <completionHelp>
                    <list>primary secondary</list>
                  </completionHelp>
                  <valueHelp>
                    <format>primary</format>
                    <description>Configure this server to be the primary node</description>
                  </valueHelp>
                  <valueHelp>
                    <format>secondary</format>
                    <description>Configure this server to be the secondary node</description>
                  </valueHelp>
                  <constraint>
                    <regex>(primary|secondary)</regex>
                  </constraint>
                  <constraintErrorMessage>Invalid DHCP failover peer status</constraintErrorMessage>
                </properties>
              </leafNode>
            </children>
          </node>
          <leafNode name="global-parameters">
            <properties>
              <help>Additional global parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
              <multi/>
            </properties>
          </leafNode>
          <leafNode name="hostfile-update">
            <properties>
              <help>Updating /etc/hosts file (per client lease)</help>
              <valueless/>
            </properties>
          </leafNode>
          <leafNode name="host-decl-name">
            <properties>
              <help>Use host declaration name for forward DNS name</help>
              <valueless/>
            </properties>
          </leafNode>
          #include <include/listen-address-ipv4.xml.i>
          <tagNode name="shared-network-name">
            <properties>
              <help>Name of DHCP shared network</help>
              <constraint>
                <regex>[-_a-zA-Z0-9.]+</regex>
              </constraint>
              <constraintErrorMessage>Invalid shared network name. May only contain letters, numbers and .-_</constraintErrorMessage>
            </properties>
            <children>
              <leafNode name="authoritative">
                <properties>
                  <help>Option to make DHCP server authoritative for this physical network</help>
                  <valueless/>
                </properties>
              </leafNode>
              #include <include/dhcp/domain-name.xml.i>
              #include <include/dhcp/domain-search.xml.i>
              #include <include/dhcp/ntp-server.xml.i>
              #include <include/dhcp/ping-check.xml.i>
              #include <include/generic-description.xml.i>
              #include <include/generic-disable-node.xml.i>
              #include <include/name-server-ipv4.xml.i>
              <leafNode name="shared-network-parameters">
                <properties>
                  <help>Additional shared-network parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
                  <multi/>
                </properties>
              </leafNode>
              <tagNode name="subnet">
                <properties>
                  <help>DHCP subnet for shared network</help>
                  <valueHelp>
                    <format>ipv4net</format>
                    <description>IPv4 address and prefix length</description>
                  </valueHelp>
                  <constraint>
                    <validator name="ipv4-prefix"/>
                  </constraint>
                  <constraintErrorMessage>Invalid IPv4 subnet definition</constraintErrorMessage>
                </properties>
                <children>
                  <leafNode name="bootfile-name">
                    <properties>
                      <help>Bootstrap file name</help>
                      <constraint>
                        <regex>[-_a-zA-Z0-9./]+</regex>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="bootfile-server">
                    <properties>
                      <help>Server from which the initial boot file is to be loaded</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>Bootfile server IPv4 address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>hostname</format>
                        <description>Bootfile server FQDN</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                        <validator name="fqdn"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="bootfile-size">
                    <properties>
                      <help>Bootstrap file size</help>
                      <valueHelp>
                        <format>u32:1-16</format>
                        <description>Bootstrap file size in 512 byte blocks</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 1-16"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="client-prefix-length">
                    <properties>
                      <help>Specifies the clients subnet mask as per RFC 950. If unset, subnet declaration is used.</help>
                      <valueHelp>
                        <format>u32:0-32</format>
                        <description>DHCP client prefix length must be 0 to 32</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-32"/>
                      </constraint>
                      <constraintErrorMessage>DHCP client prefix length must be 0 to 32</constraintErrorMessage>
                    </properties>
                  </leafNode>
                  <leafNode name="default-router">
                    <properties>
                      <help>IP address of default router</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>Default router IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  #include <include/dhcp/domain-name.xml.i>
                  #include <include/dhcp/domain-search.xml.i>
                  #include <include/generic-description.xml.i>
                  #include <include/name-server-ipv4.xml.i>
                  <leafNode name="enable-failover">
                    <properties>
                      <help>Enable DHCP failover support for this subnet</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  <leafNode name="exclude">
                    <properties>
                      <help>IP address to exclude from DHCP lease range</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>IPv4 address to exclude from lease range</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                      <multi/>
                    </properties>
                  </leafNode>
                  <leafNode name="ip-forwarding">
                    <properties>
                      <help>Enable IP forwarding on client</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  <leafNode name="lease">
                    <properties>
                      <help>Lease timeout in seconds</help>
                      <valueHelp>
                        <format>u32</format>
                        <description>DHCP lease time in seconds</description>
                      </valueHelp>
                      <constraint>
                        <validator name="numeric" argument="--range 0-4294967295"/>
                      </constraint>
                      <constraintErrorMessage>DHCP lease time must be between 0 and 4294967295 (49 days)</constraintErrorMessage>
                    </properties>
                    <defaultValue>86400</defaultValue>
                  </leafNode>
                  #include <include/dhcp/ntp-server.xml.i>
                  #include <include/dhcp/ping-check.xml.i>
                  <leafNode name="pop-server">
                    <properties>
                      <help>IP address of POP3 server</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>POP3 server IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                      <multi/>
                    </properties>
                  </leafNode>
                  <leafNode name="server-identifier">
                    <properties>
                      <help>Address for DHCP server identifier</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>DHCP server identifier IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="smtp-server">
                    <properties>
                      <help>IP address of SMTP server</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>SMTP server IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                      <multi/>
                    </properties>
                  </leafNode>
                  <tagNode name="range">
                    <properties>
                      <help>DHCP lease range</help>
                      <constraint>
                        <regex>[-_a-zA-Z0-9.]+</regex>
                      </constraint>
                      <constraintErrorMessage>Invalid range name, may only be alphanumeric, dot and hyphen</constraintErrorMessage>
                    </properties>
                    <children>
                      <leafNode name="start">
                        <properties>
                          <help>First IP address for DHCP lease range</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>IPv4 start address of pool</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv4-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="stop">
                        <properties>
                          <help>Last IP address for DHCP lease range</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>IPv4 end address of pool</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv4-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode>
                  <tagNode name="static-mapping">
                    <properties>
                      <help>Name of static mapping</help>
                      <constraint>
                        <regex>[-_a-zA-Z0-9.]+</regex>
                      </constraint>
                      <constraintErrorMessage>Invalid static mapping name, may only be alphanumeric, dot and hyphen</constraintErrorMessage>
                    </properties>
                    <children>
                      #include <include/generic-disable-node.xml.i>
                      <leafNode name="ip-address">
                        <properties>
                          <help>Fixed IP address of static mapping</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>IPv4 address used in static mapping</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ipv4-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="mac-address">
                        <properties>
                          <help>Media Access Control (MAC) address</help>
                          <valueHelp>
                            <format>macaddr</format>
                            <description>Hardware (MAC) address</description>
                          </valueHelp>
                          <constraint>
                            <validator name="mac-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                      <leafNode name="static-mapping-parameters">
                        <properties>
                          <help>Additional static-mapping parameters for DHCP server. Will be placed inside the "host" block of the mapping. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
                          <multi/>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode>
                  <tagNode name="static-route">
                    <properties>
                      <help>Classless static route destination subnet</help>
                      <valueHelp>
                        <format>ipv4net</format>
                        <description>IPv4 address and prefix length</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-prefix"/>
                      </constraint>
                    </properties>
                    <children>
                      <leafNode name="next-hop">
                        <properties>
                          <help>IP address of router to be used to reach the destination subnet</help>
                          <valueHelp>
                            <format>ipv4</format>
                            <description>IPv4 address of router</description>
                          </valueHelp>
                          <constraint>
                            <validator name="ip-address"/>
                          </constraint>
                        </properties>
                      </leafNode>
                    </children>
                  </tagNode >
                  <leafNode name="subnet-parameters">
                    <properties>
                      <help>Additional subnet parameters for DHCP server. You must use the syntax of dhcpd.conf in this text-field. Using this without proper knowledge may result in a crashed DHCP server. Check system log to look for errors.</help>
                      <multi/>
                    </properties>
                  </leafNode>
                  <leafNode name="tftp-server-name">
                    <properties>
                      <help>TFTP server name</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>TFTP server IPv4 address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>hostname</format>
                        <description>TFTP server FQDN</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                        <validator name="fqdn"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="time-offset">
                    <properties>
                      <help>Client subnet offset in seconds from Coordinated Universal Time (UTC)</help>
                      <valueHelp>
                        <format>[-]N</format>
                        <description>Time offset (number, may be negative)</description>
                      </valueHelp>
                      <constraint>
                        <regex>-?[0-9]+</regex>
                      </constraint>
                      <constraintErrorMessage>Invalid time offset value</constraintErrorMessage>
                    </properties>
                  </leafNode>
                  <leafNode name="time-server">
                    <properties>
                      <help>IP address of time server</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>Time server IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                      <multi/>
                    </properties>
                  </leafNode>
                  <node name="vendor-option">
                    <properties>
                      <help>Vendor Specific Options</help>
                    </properties>
                    <children>
                      <node name="ubiquiti">
                        <properties>
                          <help>Ubiquiti specific parameters</help>
                        </properties>
                        <children>
                          <leafNode name="unifi-controller">
                            <properties>
                              <help>Address of UniFi controller</help>
                              <valueHelp>
                                <format>ipv4</format>
                                <description>IP address of UniFi controller</description>
                              </valueHelp>
                              <constraint>
                                <validator name="ipv4-address"/>
                              </constraint>
                            </properties>
                          </leafNode>
                        </children>
                      </node>
                    </children>
                  </node>
                  <leafNode name="wins-server">
                    <properties>
                      <help>IP address for Windows Internet Name Service (WINS) server</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>WINS server IPv4 address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ipv4-address"/>
                      </constraint>
                      <multi/>
                    </properties>
                  </leafNode>
                  <leafNode name="wpad-url">
                    <properties>
                      <help>Web Proxy Autodiscovery (WPAD) URL</help>
                    </properties>
                  </leafNode>
                </children>
              </tagNode>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>