summaryrefslogtreecommitdiff
path: root/interface-definitions/interfaces-l2tpv3.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-31 12:36:53 +0100
committerChristian Poessinger <christian@poessinger.com>2019-12-31 13:00:03 +0100
commitdb658825c7bb17e3221474e22b78306dc3edd2df (patch)
treede2c5ff83533e5342f0557d8e6c5e2f3791bbf15 /interface-definitions/interfaces-l2tpv3.xml.in
parentf4a882e14ea583ca220ba1c3b3344789aeb25372 (diff)
downloadvyos-1x-db658825c7bb17e3221474e22b78306dc3edd2df.tar.gz
vyos-1x-db658825c7bb17e3221474e22b78306dc3edd2df.zip
l2tpv3: T1923: implementation in XML/Python
Tested using: R1: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::1/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.1/24' set interfaces l2tpv3 l2tpeth10 destination-port '3000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '10' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '100' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 session-id '20' set interfaces l2tpv3 l2tpeth10 source-port '6000' set interfaces l2tpv3 l2tpeth10 tunnel-id '200' R2: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::2/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.2/24' set interfaces l2tpv3 l2tpeth10 destination-port '6000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '20' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '200' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 session-id '10' set interfaces l2tpv3 l2tpeth10 source-port '3000' set interfaces l2tpv3 l2tpeth10 tunnel-id '100'
Diffstat (limited to 'interface-definitions/interfaces-l2tpv3.xml.in')
-rw-r--r--interface-definitions/interfaces-l2tpv3.xml.in151
1 files changed, 151 insertions, 0 deletions
diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in
new file mode 100644
index 000000000..520cce283
--- /dev/null
+++ b/interface-definitions/interfaces-l2tpv3.xml.in
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="interfaces">
+ <children>
+ <tagNode name="l2tpv3" owner="${vyos_conf_scripts_dir}/interfaces-l2tpv3.py">
+ <properties>
+ <help>Layer 2 Tunnel Protocol Version 3 (L2TPv3) interface</help>
+ <priority>800</priority>
+ <constraint>
+ <regex>l2tpeth[0-9]+$</regex>
+ </constraint>
+ <constraintErrorMessage>L2TPv3 interface must be named l2tpethN</constraintErrorMessage>
+ <valueHelp>
+ <format>l2tpethN</format>
+ <description>L2TPv3 interface name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/address-ipv4-ipv6.xml.i>
+ #include <include/interface-description.xml.i>
+ <leafNode name="destination-port">
+ <properties>
+ <help>UDP destination port for L2TPv3 tunnel (default: 5000)</help>
+ <valueHelp>
+ <format>1-65535</format>
+ <description>Numeric IP port</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/interface-disable.xml.i>
+ <leafNode name="encapsulation">
+ <properties>
+ <help>Encapsulation type (defualt: UDP)</help>
+ <completionHelp>
+ <list>udp ip</list>
+ </completionHelp>
+ <valueHelp>
+ <format>udp</format>
+ <description>UDP encapsulation</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ip</format>
+ <description>IP encapsulation</description>
+ </valueHelp>
+ <constraint>
+ <regex>(udp|ip)</regex>
+ </constraint>
+ <constraintErrorMessage>Encapsulation must be UDP or IP</constraintErrorMessage>
+ </properties>
+ </leafNode>
+ <leafNode name="local-ip">
+ <properties>
+ <help>Local IP address for L2TPv3 tunnel</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Local IPv4 address of tunnel</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Local IPv6 address of tunnel</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/interface-mtu-68-9000.xml.i>
+ <leafNode name="peer-session-id">
+ <properties>
+ <help>Peer session identifier</help>
+ <valueHelp>
+ <format>1-429496729</format>
+ <description>L2TPv3 peer session identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-429496729"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="peer-tunnel-id">
+ <properties>
+ <help>Peer tunnel identifier</help>
+ <valueHelp>
+ <format>1-429496729</format>
+ <description>L2TPv3 peer tunnel identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-429496729"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="remote-ip">
+ <properties>
+ <help>Remote IP address for L2TPv3 tunnel</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Remote IPv4 address of tunnel</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Remote IPv6 address of tunnel</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="session-id">
+ <properties>
+ <help>Session identifier</help>
+ <valueHelp>
+ <format>1-429496729</format>
+ <description>L2TPv3 session identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-429496729"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="source-port">
+ <properties>
+ <help>UDP source port for L2TPv3 tunnel (default: 5000)</help>
+ <valueHelp>
+ <format>1-65535</format>
+ <description>Numeric IP port</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="tunnel-id">
+ <properties>
+ <help>Local tunnel identifier</help>
+ <valueHelp>
+ <format>1-429496729</format>
+ <description>L2TPv3 local tunnel identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-429496729"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>