diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-02-16 15:00:34 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-02-16 15:00:34 +0000 |
commit | b99432ee2dc84a1d8cef59ef534392867d10de1e (patch) | |
tree | 32cb1aa69ae50b33cd6d48e027eba381a742977e /interface-definitions | |
parent | 40bf0d3ff0789378fc208a14437390a8135a7c76 (diff) | |
download | vyos-1x-b99432ee2dc84a1d8cef59ef534392867d10de1e.tar.gz vyos-1x-b99432ee2dc84a1d8cef59ef534392867d10de1e.zip |
vrrp: T1972: Ability to set IP address on not vrrp interface
Ability to set virtual_address on not vrrp-listen interface
Add ability don't track primary vrrp interface "exclude-vrrp-interface"
Add ability to set tracking (state UP/Down) on desired interfaces
For example eth0 is used for vrrp and we want to track another eth1
interface that not belong to any vrrp-group
set high-avail vrrp group WAN interface 'eth0'
set high-avail vrrp group WAN virtual-address 192.0.2.222/24 interface 'eth2'
set high-avail vrrp group WAN track exclude-vrrp-interface
set high-avail vrrp group WAN track interface 'eth1'
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/generic-interface-broadcast.xml.i | 17 | ||||
-rw-r--r-- | interface-definitions/vrrp.xml.in | 37 |
2 files changed, 51 insertions, 3 deletions
diff --git a/interface-definitions/include/generic-interface-broadcast.xml.i b/interface-definitions/include/generic-interface-broadcast.xml.i new file mode 100644 index 000000000..6f76dde1a --- /dev/null +++ b/interface-definitions/include/generic-interface-broadcast.xml.i @@ -0,0 +1,17 @@ +<!-- include start from generic-interface-broadcast.xml.i --> +<leafNode name="interface"> + <properties> + <help>Interface Name to use</help> + <completionHelp> + <script>${vyos_completion_dir}/list_interfaces.py --broadcast</script> + </completionHelp> + <valueHelp> + <format>txt</format> + <description>Interface name</description> + </valueHelp> + <constraint> + <validator name="interface-name"/> + </constraint> + </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/vrrp.xml.in b/interface-definitions/vrrp.xml.in index b58cf735c..337a0bbc9 100644 --- a/interface-definitions/vrrp.xml.in +++ b/interface-definitions/vrrp.xml.in @@ -188,6 +188,35 @@ <help>Use VRRP virtual MAC address as per RFC3768</help> </properties> </leafNode> + <node name="track"> + <properties> + <help>Track settings</help> + </properties> + <children> + <leafNode name="exclude-vrrp-interface"> + <properties> + <valueless/> + <help>Disable track state of main interface</help> + </properties> + </leafNode> + <leafNode name="interface"> + <properties> + <help>Interface name state check</help> + <completionHelp> + <script>${vyos_completion_dir}/list_interfaces.py --broadcast</script> + </completionHelp> + <valueHelp> + <format>txt</format> + <description>Interface name</description> + </valueHelp> + <constraint> + <validator name="interface-name"/> + </constraint> + <multi/> + </properties> + </leafNode> + </children> + </node> <node name="transition-script"> <properties> <help>VRRP transition scripts</help> @@ -233,7 +262,7 @@ </leafNode> </children> </node> - <leafNode name="virtual-address"> + <tagNode name="virtual-address"> <properties> <help>Virtual address (IPv4 or IPv6, but they must not be mixed in one group)</help> <valueHelp> @@ -249,9 +278,11 @@ <validator name="ipv6-host"/> </constraint> <constraintErrorMessage>Virtual address must be a valid IPv4 or IPv6 address with prefix length (e.g. 192.0.2.3/24 or 2001:db8:ff::10/64)</constraintErrorMessage> - <multi/> </properties> - </leafNode> + <children> + #include <include/generic-interface-broadcast.xml.i> + </children> + </tagNode> <leafNode name="virtual-address-excluded"> <properties> <help>Virtual address (If you need additional IPv4 and IPv6 in same group)</help> |