summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-07-29 15:25:55 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-07-29 15:25:55 -0700
commit8454bb0c2c859a919b0b163d505b9d89212bcfd2 (patch)
tree1da032d8092a49c0342b0d81bc5bc6f36b007f02
parent0579f8e2d42a3468d335823344b1995fd1515aff (diff)
downloadvyatta-cfg-quagga-8454bb0c2c859a919b0b163d505b9d89212bcfd2.tar.gz
vyatta-cfg-quagga-8454bb0c2c859a919b0b163d505b9d89212bcfd2.zip
First pass at gluing ripng cli to quagga.
-rw-r--r--templates/protocols/ripng/aggregate-address/node.def13
-rw-r--r--templates/protocols/ripng/default-information/node.def1
-rw-r--r--templates/protocols/ripng/default-information/originate/node.def10
-rw-r--r--templates/protocols/ripng/default-metric/node.def13
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/in/node.def13
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.def13
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/node.def2
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/out/node.def12
-rw-r--r--templates/protocols/ripng/interface/node.def21
-rw-r--r--templates/protocols/ripng/network/node.def13
-rw-r--r--templates/protocols/ripng/node.def7
-rw-r--r--templates/protocols/ripng/passive-interface/node.def31
-rw-r--r--templates/protocols/ripng/redistribute/bgp/metric/node.def4
-rw-r--r--templates/protocols/ripng/redistribute/bgp/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/bgp/route-map/node.def4
-rw-r--r--templates/protocols/ripng/redistribute/connected/metric/node.def6
-rw-r--r--templates/protocols/ripng/redistribute/connected/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/connected/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/kernel/metric/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/kernel/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/kernel/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/node.def1
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/metric/node.def4
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/node.def21
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/static/metric/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/static/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/static/route-map/node.def3
-rw-r--r--templates/protocols/ripng/route/node.def14
-rw-r--r--templates/protocols/ripng/timers/garbage-collection/node.def9
-rw-r--r--templates/protocols/ripng/timers/node.def16
-rw-r--r--templates/protocols/ripng/timers/timeout/node.def9
-rw-r--r--templates/protocols/ripng/timers/update/node.def9
43 files changed, 420 insertions, 0 deletions
diff --git a/templates/protocols/ripng/aggregate-address/node.def b/templates/protocols/ripng/aggregate-address/node.def
new file mode 100644
index 00000000..4245257a
--- /dev/null
+++ b/templates/protocols/ripng/aggregate-address/node.def
@@ -0,0 +1,13 @@
+multi:
+type: ipv6net
+help: Set aggregate RIPng route announcement
+
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "aggregate-address $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no aggregate-address $VAR(@)"
diff --git a/templates/protocols/ripng/default-information/node.def b/templates/protocols/ripng/default-information/node.def
new file mode 100644
index 00000000..47215862
--- /dev/null
+++ b/templates/protocols/ripng/default-information/node.def
@@ -0,0 +1 @@
+help: Set to control distribution of default route
diff --git a/templates/protocols/ripng/default-information/originate/node.def b/templates/protocols/ripng/default-information/originate/node.def
new file mode 100644
index 00000000..359a7d31
--- /dev/null
+++ b/templates/protocols/ripng/default-information/originate/node.def
@@ -0,0 +1,10 @@
+help: Set to distribute a default route
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "default-information originate"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no default-information originate" "
+
diff --git a/templates/protocols/ripng/default-metric/node.def b/templates/protocols/ripng/default-metric/node.def
new file mode 100644
index 00000000..85463d28
--- /dev/null
+++ b/templates/protocols/ripng/default-metric/node.def
@@ -0,0 +1,13 @@
+type: u32
+help: Set metric of redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "Must be between 1-16"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "default-metric $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no default-metric $VAR(@)"
+
+comp_help <1-16> Default metric
diff --git a/templates/protocols/ripng/distribute-list/access-list/in/node.def b/templates/protocols/ripng/distribute-list/access-list/in/node.def
new file mode 100644
index 00000000..ea05f150
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/access-list/in/node.def
@@ -0,0 +1,13 @@
+type: u32
+help: Set access-list to apply to input packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list $VAR(@) in"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list $VAR(@) in"
+
diff --git a/templates/protocols/ripng/distribute-list/access-list/node.def b/templates/protocols/ripng/distribute-list/access-list/node.def
new file mode 100644
index 00000000..d7baa021
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/access-list/node.def
@@ -0,0 +1 @@
+help: Set access-list
diff --git a/templates/protocols/ripng/distribute-list/access-list/out/node.def b/templates/protocols/ripng/distribute-list/access-list/out/node.def
new file mode 100644
index 00000000..f11f5c03
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/access-list/out/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set access-list to apply to output packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list $VAR(@) out"
+
+delete: $vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list $VAR(@) out"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.def b/templates/protocols/ripng/distribute-list/interface/node.def
new file mode 100644
index 00000000..9219eda6
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.def
@@ -0,0 +1,13 @@
+tag:
+type: txt
+help: Set to apply filtering to an interface
+
+syntax:expression: exec "\
+ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
+ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+
+allowed: local -a array;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def
new file mode 100644
index 00000000..29d91a78
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set access-list to apply to input packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list $VAR(@) in $VAR(../../@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list $VAR(@) in $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def
new file mode 100644
index 00000000..d7baa021
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def
@@ -0,0 +1 @@
+help: Set access-list
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def
new file mode 100644
index 00000000..19805001
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def
@@ -0,0 +1,12 @@
+type: u32
+help: Set access-list to apply to output packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";"access-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list $VAR(@) out $VAR(../../@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list $VAR(@) out $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def
new file mode 100644
index 00000000..93ba4f1c
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: Set prefix-list to apply to input packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list prefix $VAR(@) in $VAR(../../@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list prefix $VAR(@) in $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def
new file mode 100644
index 00000000..30eb3f3f
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def
@@ -0,0 +1 @@
+help: Set prefix-list
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def
new file mode 100644
index 00000000..b3585ecb
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: Set prefix-list to apply to output packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list prefix $VAR(@) out $VAR(../../@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list prefix $VAR(@) out $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/node.def b/templates/protocols/ripng/distribute-list/node.def
new file mode 100644
index 00000000..f7255a70
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/node.def
@@ -0,0 +1,2 @@
+help: Set to filter networks in routing updates
+
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/in/node.def b/templates/protocols/ripng/distribute-list/prefix-list/in/node.def
new file mode 100644
index 00000000..4b169517
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/prefix-list/in/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: Set prefix-list to apply to input packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list prefix $VAR(@) in"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list prefix $VAR(@) in"
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/node.def b/templates/protocols/ripng/distribute-list/prefix-list/node.def
new file mode 100644
index 00000000..30eb3f3f
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/prefix-list/node.def
@@ -0,0 +1 @@
+help: Set prefix-list
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/out/node.def b/templates/protocols/ripng/distribute-list/prefix-list/out/node.def
new file mode 100644
index 00000000..831880c3
--- /dev/null
+++ b/templates/protocols/ripng/distribute-list/prefix-list/out/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: Set prefix-list to apply to output packets
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" ";"prefix-list $VAR(@) doesn't exist"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "distribute-list prefix $VAR(@) out"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no distribute-list prefix $VAR(@) out"
diff --git a/templates/protocols/ripng/interface/node.def b/templates/protocols/ripng/interface/node.def
new file mode 100644
index 00000000..f62343a0
--- /dev/null
+++ b/templates/protocols/ripng/interface/node.def
@@ -0,0 +1,21 @@
+multi:
+type: txt
+help: Set interface name
+
+syntax:expression: exec " \
+ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
+ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "network $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no network $VAR(@)" "
+
+allowed: local -a array;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}
diff --git a/templates/protocols/ripng/network/node.def b/templates/protocols/ripng/network/node.def
new file mode 100644
index 00000000..0df3d570
--- /dev/null
+++ b/templates/protocols/ripng/network/node.def
@@ -0,0 +1,13 @@
+multi:
+type: ipv6net
+help: Set RIPng network
+
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "network $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no network $VAR(@)"
diff --git a/templates/protocols/ripng/node.def b/templates/protocols/ripng/node.def
new file mode 100644
index 00000000..550a5ac7
--- /dev/null
+++ b/templates/protocols/ripng/node.def
@@ -0,0 +1,7 @@
+help: Configure Routing Information Protocol (RIPng) parameters
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "no router ripng"
diff --git a/templates/protocols/ripng/passive-interface/node.def b/templates/protocols/ripng/passive-interface/node.def
new file mode 100644
index 00000000..403430b3
--- /dev/null
+++ b/templates/protocols/ripng/passive-interface/node.def
@@ -0,0 +1,31 @@
+multi:
+type: txt
+help: Set to suppress routing updates on an interface
+
+syntax:expression: exec " \
+ if [ -z \"`ip addr | grep $VAR(@) `\" ] && [ x$VAR(@) != xdefault ]; then \
+ echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
+ exit 1; \
+ fi ; "
+
+update: if [ x$VAR(x) == xdefault ]; then
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "passive-interface default";
+ else
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "passive-interface $VAR(@)";
+ fi;
+delete: if [ x$VAR(x) == xdefault ]; then
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no passive-interface default"
+ else
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no passive-interface $VAR(@)";
+ fi;
+allowed: local -a array;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}
diff --git a/templates/protocols/ripng/redistribute/bgp/metric/node.def b/templates/protocols/ripng/redistribute/bgp/metric/node.def
new file mode 100644
index 00000000..6c402ef0
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/bgp/metric/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Set metric for redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; \
+ "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/bgp/node.def b/templates/protocols/ripng/redistribute/bgp/node.def
new file mode 100644
index 00000000..a712b69b
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/bgp/node.def
@@ -0,0 +1,20 @@
+help: Set to redistribute BGP routes
+
+delete: touch /tmp/rip-redist-bgp.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no redistribute bgp"
+ if [ -f "/tmp/rip-redist-bgp.$PPID" ]; then
+ rm -rf /tmp/rip-redist-bgp.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "redistribute bgp $COND";
+ fi
diff --git a/templates/protocols/ripng/redistribute/bgp/route-map/node.def b/templates/protocols/ripng/redistribute/bgp/route-map/node.def
new file mode 100644
index 00000000..cf70580f
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/bgp/route-map/node.def
@@ -0,0 +1,4 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
+
diff --git a/templates/protocols/ripng/redistribute/connected/metric/node.def b/templates/protocols/ripng/redistribute/connected/metric/node.def
new file mode 100644
index 00000000..101e24f9
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/connected/metric/node.def
@@ -0,0 +1,6 @@
+type: u32
+help: Set metric for redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
+
+
+
diff --git a/templates/protocols/ripng/redistribute/connected/node.def b/templates/protocols/ripng/redistribute/connected/node.def
new file mode 100644
index 00000000..a0a64fd2
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/connected/node.def
@@ -0,0 +1,20 @@
+help: Set to redistribute connected routes
+
+delete: touch /tmp/rip-redist-connected.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no redistribute connected"
+ if [ -f "/tmp/rip-redist-connected.$PPID" ]; then
+ rm -rf /tmp/rip-redist-connected.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "redistribute connected $COND";
+ fi;
diff --git a/templates/protocols/ripng/redistribute/connected/route-map/node.def b/templates/protocols/ripng/redistribute/connected/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/connected/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ripng/redistribute/kernel/metric/node.def b/templates/protocols/ripng/redistribute/kernel/metric/node.def
new file mode 100644
index 00000000..ad569327
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/kernel/metric/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: Set metric for redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/kernel/node.def b/templates/protocols/ripng/redistribute/kernel/node.def
new file mode 100644
index 00000000..6b233f87
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/kernel/node.def
@@ -0,0 +1,20 @@
+help: Set to redistribute kernel routes
+
+delete: touch /tmp/rip-redist-kernel.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no redistribute kernel";
+ if [ -f "/tmp/rip-redist-kernel.$PPID" ]; then
+ rm -rf /tmp/rip-redist-kernel.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "redistribute kernel $COND";
+ fi;
diff --git a/templates/protocols/ripng/redistribute/kernel/route-map/node.def b/templates/protocols/ripng/redistribute/kernel/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/kernel/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ripng/redistribute/node.def b/templates/protocols/ripng/redistribute/node.def
new file mode 100644
index 00000000..0f60ac58
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/node.def
@@ -0,0 +1 @@
+help: Set to redistribute information from another routing protocol
diff --git a/templates/protocols/ripng/redistribute/ospfv3/metric/node.def b/templates/protocols/ripng/redistribute/ospfv3/metric/node.def
new file mode 100644
index 00000000..6ed582ad
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/ospfv3/metric/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Set metric for redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
+
diff --git a/templates/protocols/ripng/redistribute/ospfv3/node.def b/templates/protocols/ripng/redistribute/ospfv3/node.def
new file mode 100644
index 00000000..31e23803
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/ospfv3/node.def
@@ -0,0 +1,21 @@
+help: Set to redistribute OSPFv3 routes
+
+delete: touch /tmp/rip-redist-ospf6.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no redistribute ospf6";
+ if [ -f "/tmp/rip-redist-ospf6.$PPID" ]; then
+ rm -rf /tmp/rip-redist-ospf6.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "redistribute ospf6 $COND";
+ fi;
+
diff --git a/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def b/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ripng/redistribute/static/metric/node.def b/templates/protocols/ripng/redistribute/static/metric/node.def
new file mode 100644
index 00000000..ad569327
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/static/metric/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: Set metric for redistributed routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/static/node.def b/templates/protocols/ripng/redistribute/static/node.def
new file mode 100644
index 00000000..26f9fa09
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/static/node.def
@@ -0,0 +1,20 @@
+help: Set to redistribute static routes
+
+delete: touch /tmp/rip-redist-static.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no redistribute static";
+ if [ -f "/tmp/rip-redist-static.$PPID" ]; then
+ rm -rf /tmp/rip-redist-static.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "redistribute static $COND";
+ fi;
diff --git a/templates/protocols/ripng/redistribute/static/route-map/node.def b/templates/protocols/ripng/redistribute/static/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ripng/redistribute/static/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ripng/route/node.def b/templates/protocols/ripng/route/node.def
new file mode 100644
index 00000000..bb35078f
--- /dev/null
+++ b/templates/protocols/ripng/route/node.def
@@ -0,0 +1,14 @@
+multi:
+type: ipv6net
+help: Set RIPng static route
+
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "route $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no route $VAR(@)"
+
diff --git a/templates/protocols/ripng/timers/garbage-collection/node.def b/templates/protocols/ripng/timers/garbage-collection/node.def
new file mode 100644
index 00000000..c7d3f8ed
--- /dev/null
+++ b/templates/protocols/ripng/timers/garbage-collection/node.def
@@ -0,0 +1,9 @@
+type: u32
+default: 120
+help: Set garbage collection timer
+
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
+ "Garbage collection timer must be between 0 and 65535"
+
+comp_help: possible completions:
+ <0-65535> Garbage colletion time (default 120)
diff --git a/templates/protocols/ripng/timers/node.def b/templates/protocols/ripng/timers/node.def
new file mode 100644
index 00000000..16f04ff4
--- /dev/null
+++ b/templates/protocols/ripng/timers/node.def
@@ -0,0 +1,16 @@
+help: Set RIPng timer values
+
+delete: touch /tmp/ripng-timers.$PPID
+
+end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "no timers basic"; \
+ if [ -f "/tmp/ripng-timers.$PPID" ]; then
+ rm -rf /tmp/ripng-timers.$PPID;
+ else
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router ripng" \
+ -c "timers basic $VAR(./update/@) \
+ $VAR(./timeout/@) \
+ $VAR(./garbage-collection/@)"
+ fi;
diff --git a/templates/protocols/ripng/timers/timeout/node.def b/templates/protocols/ripng/timers/timeout/node.def
new file mode 100644
index 00000000..11efdc0b
--- /dev/null
+++ b/templates/protocols/ripng/timers/timeout/node.def
@@ -0,0 +1,9 @@
+type: u32
+default: 180
+help: Set routing information timeout timer
+
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
+ "Timeout timer must be between 0 and 65535"
+
+comp_help: possible completions:
+ <0-65535> Routing information timeout timer (default 180)
diff --git a/templates/protocols/ripng/timers/update/node.def b/templates/protocols/ripng/timers/update/node.def
new file mode 100644
index 00000000..1f06eb5b
--- /dev/null
+++ b/templates/protocols/ripng/timers/update/node.def
@@ -0,0 +1,9 @@
+type: u32
+default: 30
+help: Set routing table update timer
+
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
+ "Update timer must be between 0 and 65535"
+
+comp_help: possible completions:
+ <0-65535> Routing table update timer in seconds (default 30)