summaryrefslogtreecommitdiff
path: root/interface-definitions/service_dhcp-server.xml.in
blob: a5cee62d10bd346425a9c330644081ab49effa0a (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
<?xml version="1.0"?>
<!-- DHCP server configuration -->
<interfaceDefinition>
  <node name="service">
    <children>
      <node name="dhcp-server" owner="${vyos_conf_scripts_dir}/service_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>
                    #include <include/constraint/alpha-numeric-hyphen-underscore-dot.xml.i>
                  </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>
              #include <include/pki/ca-certificate.xml.i>
              #include <include/pki/certificate.xml.i>
            </children>
          </node>
          <leafNode name="hostfile-update">
            <properties>
              <help>Updating /etc/hosts file (per client lease)</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>
                #include <include/constraint/alpha-numeric-hyphen-underscore-dot.xml.i>
              </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/option-v4.xml.i>
              #include <include/generic-description.xml.i>
              #include <include/generic-disable-node.xml.i>
              <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>
                  #include <include/dhcp/option-v4.xml.i>
                  #include <include/generic-description.xml.i>
                  #include <include/generic-disable-node.xml.i>
                  <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="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>
                  <tagNode name="range">
                    <properties>
                      <help>DHCP lease range</help>
                      <constraint>
                        #include <include/constraint/alpha-numeric-hyphen-underscore-dot.xml.i>
                      </constraint>
                      <constraintErrorMessage>Invalid range name, may only be alphanumeric, dot and hyphen</constraintErrorMessage>
                    </properties>
                    <children>
                      #include <include/dhcp/option-v4.xml.i>
                      <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>Hostname for static mapping reservation</help>
                      <constraint>
                        <validator name="fqdn"/>
                      </constraint>
                      <constraintErrorMessage>Invalid static mapping hostname</constraintErrorMessage>
                    </properties>
                    <children>
                      #include <include/dhcp/option-v4.xml.i>
                      #include <include/generic-description.xml.i>
                      #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>
                      #include <include/interface/mac.xml.i>
                      #include <include/interface/duid.xml.i>
                    </children>
                  </tagNode>
                </children>
              </tagNode>
            </children>
          </tagNode>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>