summaryrefslogtreecommitdiff
path: root/interface-definitions/service_ipoe-server.xml.in
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-30 23:25:20 +0100
committerChristian Breunig <christian@breunig.cc>2023-12-31 23:49:48 +0100
commit4ef110fd2c501b718344c72d495ad7e16d2bd465 (patch)
treee98bf08f93c029ec4431a3b6ca078e7562e0cc58 /interface-definitions/service_ipoe-server.xml.in
parent2286b8600da6c631b17e1d5b9b341843e50f9abf (diff)
downloadvyos-1x-4ef110fd2c501b718344c72d495ad7e16d2bd465.tar.gz
vyos-1x-4ef110fd2c501b718344c72d495ad7e16d2bd465.zip
T5474: establish common file name pattern for XML conf mode commands
We will use _ as CLI level divider. The XML definition filename and also the Python helper should match the CLI node. Example: set interfaces ethernet -> interfaces_ethernet.xml.in set interfaces bond -> interfaces_bond.xml.in set service dhcp-server -> service_dhcp-server-xml.in
Diffstat (limited to 'interface-definitions/service_ipoe-server.xml.in')
-rw-r--r--interface-definitions/service_ipoe-server.xml.in190
1 files changed, 190 insertions, 0 deletions
diff --git a/interface-definitions/service_ipoe-server.xml.in b/interface-definitions/service_ipoe-server.xml.in
new file mode 100644
index 000000000..edfe6a34c
--- /dev/null
+++ b/interface-definitions/service_ipoe-server.xml.in
@@ -0,0 +1,190 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="service">
+ <children>
+ <node name="ipoe-server" owner="${vyos_conf_scripts_dir}/service_ipoe-server.py">
+ <properties>
+ <help>Internet Protocol over Ethernet (IPoE) Server</help>
+ <priority>900</priority>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Interface to listen dhcp or unclassified packets</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <leafNode name="mode">
+ <properties>
+ <help>Client connectivity mode</help>
+ <completionHelp>
+ <list>l2 l3</list>
+ </completionHelp>
+ <valueHelp>
+ <format>l2</format>
+ <description>Client located on same interface as server</description>
+ </valueHelp>
+ <valueHelp>
+ <format>l3</format>
+ <description>Client located behind a router</description>
+ </valueHelp>
+ <constraint>
+ <regex>(l2|l3)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>l2</defaultValue>
+ </leafNode>
+ <leafNode name="network">
+ <properties>
+ <help>Enables clients to share the same network or each client has its own vlan</help>
+ <completionHelp>
+ <list>shared vlan</list>
+ </completionHelp>
+ <constraint>
+ <regex>(shared|vlan)</regex>
+ </constraint>
+ <valueHelp>
+ <format>shared</format>
+ <description>Multiple clients share the same network</description>
+ </valueHelp>
+ <valueHelp>
+ <format>vlan</format>
+ <description>One VLAN per client</description>
+ </valueHelp>
+ </properties>
+ <defaultValue>shared</defaultValue>
+ </leafNode>
+ <leafNode name="client-subnet">
+ <properties>
+ <help>Client address pool</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IPv4 address and prefix length</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <node name="external-dhcp">
+ <properties>
+ <help>DHCP requests will be forwarded</help>
+ </properties>
+ <children>
+ <leafNode name="dhcp-relay">
+ <properties>
+ <help>DHCP Server the request will be redirected to.</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address of the DHCP Server</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="giaddr">
+ <properties>
+ <help>Relay Agent IPv4 Address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Gateway IP address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ #include <include/accel-ppp/vlan.xml.i>
+ </children>
+ </tagNode>
+ #include <include/accel-ppp/max-concurrent-sessions.xml.i>
+ #include <include/name-server-ipv4-ipv6.xml.i>
+ #include <include/accel-ppp/client-ip-pool.xml.i>
+ #include <include/accel-ppp/gateway-address-multi.xml.i>
+ #include <include/accel-ppp/client-ipv6-pool.xml.i>
+ <node name="authentication">
+ <properties>
+ <help>Client authentication methods</help>
+ </properties>
+ <children>
+ #include <include/accel-ppp/auth-mode.xml.i>
+ <tagNode name="interface">
+ <properties>
+ <help>Network interface for client MAC addresses</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="mac">
+ <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>
+ <children>
+ <node name="rate-limit">
+ <properties>
+ <help>Upload/Download speed limits</help>
+ </properties>
+ <children>
+ <leafNode name="upload">
+ <properties>
+ <help>Upload bandwidth limit in kbits/sec</help>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="download">
+ <properties>
+ <help>Download bandwidth limit in kbits/sec</help>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="vlan">
+ <properties>
+ <help>VLAN monitor for automatic creation of VLAN interfaces</help>
+ <valueHelp>
+ <format>u32:1-4094</format>
+ <description>Client VLAN id</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4094"/>
+ </constraint>
+ <constraintErrorMessage>VLAN IDs need to be in range 1-4094</constraintErrorMessage>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <node name="radius">
+ <children>
+ #include <include/accel-ppp/radius-additions-rate-limit.xml.i>
+ </children>
+ </node>
+ #include <include/radius-auth-server-ipv4.xml.i>
+ #include <include/accel-ppp/radius-additions.xml.i>
+ </children>
+ </node>
+ #include <include/accel-ppp/default-pool.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>