diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-07-27 15:00:37 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-07-27 15:00:37 -0700 |
commit | 1a2eec7ac911aa1e455de7b1a2e71d3536ac83af (patch) | |
tree | e5758898eb5d537d3d69d64b05a0ac9f5457da34 /templates/protocols/static/route6 | |
parent | 0cda6a40b32c442df5e3ae3e8513bb19bc219d7e (diff) | |
download | vyatta-cfg-quagga-1a2eec7ac911aa1e455de7b1a2e71d3536ac83af.tar.gz vyatta-cfg-quagga-1a2eec7ac911aa1e455de7b1a2e71d3536ac83af.zip |
Add cli for IPv6 static routes.
Diffstat (limited to 'templates/protocols/static/route6')
7 files changed, 43 insertions, 0 deletions
diff --git a/templates/protocols/static/route6/node.def b/templates/protocols/static/route6/node.def new file mode 100644 index 00000000..7f95d0be --- /dev/null +++ b/templates/protocols/static/route6/node.def @@ -0,0 +1,4 @@ +tag: +type: ipv6net +help: Set a static IPv6 route +syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" diff --git a/templates/protocols/static/route6/node.tag/blackhole/distance/node.def b/templates/protocols/static/route6/node.tag/blackhole/distance/node.def new file mode 100644 index 00000000..08a06ad8 --- /dev/null +++ b/templates/protocols/static/route6/node.tag/blackhole/distance/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Set distance value for this route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)" +comp_help: <1-255> Distance for this route diff --git a/templates/protocols/static/route6/node.tag/blackhole/node.def b/templates/protocols/static/route6/node.tag/blackhole/node.def new file mode 100644 index 00000000..aaeab5b6 --- /dev/null +++ b/templates/protocols/static/route6/node.tag/blackhole/node.def @@ -0,0 +1,11 @@ +help: Set to silently discard pkts when matched +delete:expression: "touch /tmp/static.$PPID" +end:expression: "if [ -f \"/tmp/static.$PPID\" ]; then \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $VAR(../@) null0\" ; \ + rm /tmp/static.$PPID; \ + else \ + if [ -n \"$VAR(./distance/@)\" ]; then \ + DIST=\"$VAR(./distance/@)\"; \ + fi; \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route $VAR(../@) null0 $DIST \" ; \ + fi; " diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.def new file mode 100644 index 00000000..d62088ce --- /dev/null +++ b/templates/protocols/static/route6/node.tag/next-hop/node.def @@ -0,0 +1,15 @@ +tag: +type: ipv6 +help: Set the next-hop IPv6 router +delete: touch /tmp/static.$PPID +end: if [ -f "/tmp/static.$PPID" ]; then + if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl "$VAR(../@)" "$VAR(@)"; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "no ipv6 route $VAR(../@) $VAR(@)" ; + fi; + rm /tmp/static.$PPID; + else + if [ -n "$VAR(./distance/@)" ]; then + DIST="$VAR(./distance/@)"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "ipv6 route $VAR(../@) $VAR(@) $DIST"; + fi; diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def new file mode 100644 index 00000000..08a06ad8 --- /dev/null +++ b/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Set distance value for this route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)" +comp_help: <1-255> Distance for this route diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def new file mode 100644 index 00000000..08dff1a9 --- /dev/null +++ b/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def @@ -0,0 +1,2 @@ +help: Set next-hop router + diff --git a/templates/protocols/static/route6/node.tag/node.def b/templates/protocols/static/route6/node.tag/node.def new file mode 100644 index 00000000..7e15c498 --- /dev/null +++ b/templates/protocols/static/route6/node.tag/node.def @@ -0,0 +1,3 @@ +help: Set IP network +commit:expression: $VAR(./next-hop/) != "" || $VAR(./blackhole/) != ""; "Must add either a next-hop or blackhole for route $VAR(@)" + |