diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-08-05 13:55:17 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-08-05 13:55:17 -0700 |
commit | 74b93606edb78681bfefa166acf179d2714a0e93 (patch) | |
tree | dff4dff8f0880b6d0dc1a4683bc84f11a1708125 | |
parent | 4faa69ac6aac4855f7eeb9904eb2c48bb7d27f0a (diff) | |
download | vyatta-cfg-quagga-74b93606edb78681bfefa166acf179d2714a0e93.tar.gz vyatta-cfg-quagga-74b93606edb78681bfefa166acf179d2714a0e93.zip |
Add BGP IPv6 redistribute commands.
16 files changed, 146 insertions, 0 deletions
diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/metric/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/metric/node.def new file mode 100644 index 00000000..8ac30200 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set the metric for redistributed routes +comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def new file mode 100644 index 00000000..34ef9014 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/node.def @@ -0,0 +1,22 @@ +help: Set to redistribute connected routes into BGP + +delete: touch /tmp/bgp-redist-connected.$PPID + +end: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no redistribute connected"; + if [ -f "/tmp/bgp-redist-connected.$PPID" ]; then + rm -rf /tmp/bgp-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-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "redistribute connected $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/route-map/node.def new file mode 100644 index 00000000..026de05a --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/connected/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set a route map to filter redistributed routes +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute connected: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/metric/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/metric/node.def new file mode 100644 index 00000000..8ac30200 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set the metric for redistributed routes +comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def new file mode 100644 index 00000000..a3915423 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/node.def @@ -0,0 +1,22 @@ +help: Set to redistribute kernel routes into BGP + +delete: touch /tmp/bgp-redist-kernel.$PPID + +end: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no redistribute kernel "; + if [ -f "/tmp/bgp-redist-kernel.$PPID" ]; then + rm -rf /tmp/bgp-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-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "redistribute kernel $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/route-map/node.def new file mode 100644 index 00000000..e513130e --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/kernel/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set a route map to filter redistributed routes +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute kernel: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/node.def new file mode 100644 index 00000000..105e22db --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/node.def @@ -0,0 +1 @@ +help: Set redistribution of routes from other protocols into BGP diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/metric/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/metric/node.def new file mode 100644 index 00000000..8ac30200 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set the metric for redistributed routes +comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def new file mode 100644 index 00000000..ae44b906 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/node.def @@ -0,0 +1,22 @@ +help: Set to redistribute OSPFv3 routes into BGP + +delete: touch /tmp/bgp-redist-ospf.$PPID + +end: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no redistribute ospf6"; + if [ -f "/tmp/bgp-redist-ospf.$PPID" ]; then + rm -rf /tmp/bgp-redist-ospf.$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-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "redistribute ospf6 $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/route-map/node.def new file mode 100644 index 00000000..e2b5c019 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ospfv3/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set a route map to filter redistributed routes +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute ospf: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/metric/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/metric/node.def new file mode 100644 index 00000000..8ac30200 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set the metric for redistributed routes +comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def new file mode 100644 index 00000000..4ba7c3a1 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/node.def @@ -0,0 +1,22 @@ +help: Set to redistribute RIPng routes into BGP + +delete: touch /tmp/bgp-redist-rip.$PPID + +end: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no redistribute ripng"; + if [ -f "/tmp/bgp-redist-rip.$PPID" ]; then + rm -rf /tmp/bgp-redist-rip.$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-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "redistribute ripng $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/route-map/node.def new file mode 100644 index 00000000..b8461b4c --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/ripng/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set a route map to filter redistributed routes +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute rip: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/metric/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/metric/node.def new file mode 100644 index 00000000..8ac30200 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set the metric for redistributed routes +comp_help: \1 <0-4294967295>\tmetric diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def new file mode 100644 index 00000000..23f40710 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/node.def @@ -0,0 +1,22 @@ +help: Set to redistribute static routes into BGP + +delete: touch /tmp/bgp-redist-static.$PPID + +end: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no redistribute static"; + if [ -f "/tmp/bgp-redist-static.$PPID" ]; then + rm -rf /tmp/bgp-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-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "redistribute static $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def new file mode 100644 index 00000000..61352932 --- /dev/null +++ b/templates/protocols/bgp/node.tag/ipv6/redistribute/static/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set a route map to filter redistributed routes +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute static: route-map $VAR(@) doesn't exist" |