summaryrefslogtreecommitdiff
path: root/interface-definitions/policy-local-route.xml.in
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2020-11-17 15:14:42 +0000
committersever-sever <v.gletenko@vyos.io>2020-11-20 15:49:13 +0000
commit7606fa6081e2f6d76982056ca93003e6c5dbd685 (patch)
tree813ca20057c45dc993c3876c38a64f94e9c22b26 /interface-definitions/policy-local-route.xml.in
parent4dc93212f77c00433330f5e90d4c5383c883f644 (diff)
downloadvyos-1x-7606fa6081e2f6d76982056ca93003e6c5dbd685.tar.gz
vyos-1x-7606fa6081e2f6d76982056ca93003e6c5dbd685.zip
policy-conf: T439: Add policy local-route PBR
Diffstat (limited to 'interface-definitions/policy-local-route.xml.in')
-rw-r--r--interface-definitions/policy-local-route.xml.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/interface-definitions/policy-local-route.xml.in b/interface-definitions/policy-local-route.xml.in
new file mode 100644
index 000000000..5536c71c8
--- /dev/null
+++ b/interface-definitions/policy-local-route.xml.in
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!-- Policy local-route -->
+<interfaceDefinition>
+ <node name="policy">
+ <children>
+ <node name="local-route" owner="${vyos_conf_scripts_dir}/policy-local-route.py">
+ <properties>
+ <help>IPv4 policy route of local traffic</help>
+ </properties>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Policy local-route rule set number</help>
+ <valueHelp>
+ <!-- table main with prio 32766 -->
+ <format>&lt;1-32765&gt;</format>
+ <description>Local-route rule number (1-219)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-32765"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="set">
+ <properties>
+ <help>Packet modifications</help>
+ </properties>
+ <children>
+ <leafNode name="table">
+ <properties>
+ <help>Routing table to forward packet with</help>
+ <valueHelp>
+ <format>&lt;1-200&gt;</format>
+ <description>Table number</description>
+ </valueHelp>
+ <completionHelp>
+ <list>main</list>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="source">
+ <properties>
+ <help>Source address or prefix</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Address to match against</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Prefix to match against</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ip-prefix"/>
+ </constraint>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>