diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-11-20 13:35:24 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-11-24 16:06:38 +0000 |
commit | 48ab6413cedb71934118143a7e095e946ac38bb7 (patch) | |
tree | 49bc86211827f52f83b1d9a0c9554c50406394b9 /interface-definitions/interfaces-virtual-ethernet.xml.in | |
parent | b7e203d168d5549b2e5c7d0f7168317744c1d71e (diff) | |
download | vyos-1x-48ab6413cedb71934118143a7e095e946ac38bb7.tar.gz vyos-1x-48ab6413cedb71934118143a7e095e946ac38bb7.zip |
T4825: Add interface type veth
Add interface type veth (Virtual ethernet)
One of the usecases it's interconnect different vrf's and
default vrf via bridge
set interfaces virtual-ethernet veth0 peer-name 'veth1010'
set interfaces virtual-ethernet veth1010 address '10.0.0.10/24'
set interfaces virtual-ethernet veth1010 peer-name 'veth0'
set interfaces virtual-ethernet veth1010 vrf 'foo'
set interfaces bridge br0 address '10.0.0.1/24'
set interfaces bridge br0 member interface veth0
Diffstat (limited to 'interface-definitions/interfaces-virtual-ethernet.xml.in')
-rw-r--r-- | interface-definitions/interfaces-virtual-ethernet.xml.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/interface-definitions/interfaces-virtual-ethernet.xml.in b/interface-definitions/interfaces-virtual-ethernet.xml.in new file mode 100644 index 000000000..3b78b3637 --- /dev/null +++ b/interface-definitions/interfaces-virtual-ethernet.xml.in @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="interfaces"> + <children> + <tagNode name="virtual-ethernet" owner="${vyos_conf_scripts_dir}/interfaces-virtual-ethernet.py"> + <properties> + <help>Virtual Ethernet Interface (veth)</help> + <priority>300</priority> + <constraint> + <regex>veth[0-9]+</regex> + </constraint> + <constraintErrorMessage>Virutal Ethernet interface must be named vethN</constraintErrorMessage> + <valueHelp> + <format>vethN</format> + <description>Virtual Ethernet interface name</description> + </valueHelp> + </properties> + <children> + #include <include/interface/address-ipv4-ipv6-dhcp.xml.i> + #include <include/interface/description.xml.i> + #include <include/interface/disable.xml.i> + #include <include/interface/vrf.xml.i> + <leafNode name="peer-name"> + <properties> + <help>Virtual ethernet peer interface name</help> + <constraint> + <regex>veth[0-9]+</regex> + </constraint> + <constraintErrorMessage>Virutal Ethernet interface must be named vethN</constraintErrorMessage> + </properties> + </leafNode> + </children> + </tagNode> + </children> + </node> +</interfaceDefinition> |