diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-23 23:50:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-23 23:50:43 +0100 |
commit | 0d793e74cd8f31e288130417e7c325628c15b18f (patch) | |
tree | 91b72b9b1fa18cbc22d346021414c14c5acaf8cc /templates/protocols/ospf | |
parent | fda7164c488082fe037da26823eea5f1634bd117 (diff) | |
parent | d3578739d67dff813c8eccc1428bd40b96ed8340 (diff) | |
download | vyatta-cfg-quagga-0d793e74cd8f31e288130417e7c325628c15b18f.tar.gz vyatta-cfg-quagga-0d793e74cd8f31e288130417e7c325628c15b18f.zip |
Merge pull request #70 from sever-sever/T3211_13
routing: T3211: Add redistribute protocol IS-IS to bgp ospf
Diffstat (limited to 'templates/protocols/ospf')
5 files changed, 35 insertions, 1 deletions
diff --git a/templates/protocols/ospf/access-list/node.tag/export/node.def b/templates/protocols/ospf/access-list/node.tag/export/node.def index 50d2db49..0d8ff44a 100644 --- a/templates/protocols/ospf/access-list/node.tag/export/node.def +++ b/templates/protocols/ospf/access-list/node.tag/export/node.def @@ -1,10 +1,11 @@ multi: type: txt help: Filter for outgoing routing updates [REQUIRED] -syntax:expression: $VAR(@) in "bgp", "connected", "kernel", "rip", "static"; "Must be (bgp, connected, kernel, rip, or static)" +syntax:expression: $VAR(@) in "bgp", "connected", "isis", "kernel", "rip", "static"; "Must be (bgp, connected, isis, kernel, rip, or static)" val_help: bgp Filter bgp routes; val_help: connected Filter connected routes; +val_help: isis Filter IS-IS routes; val_help: kernel Filter kernel routes; val_help: rip Filter rip routes; val_help: static Filter static routes; diff --git a/templates/protocols/ospf/redistribute/isis/metric-type/node.def b/templates/protocols/ospf/redistribute/isis/metric-type/node.def new file mode 100644 index 00000000..e49f528c --- /dev/null +++ b/templates/protocols/ospf/redistribute/isis/metric-type/node.def @@ -0,0 +1,5 @@ +type: u32 +help: OSPF metric type +default: 2 +syntax:expression: $VAR(@) in 1, 2 ; "metric-type must be either 1 or 2" +val_help: u32:1-2; Metric type (default 2) diff --git a/templates/protocols/ospf/redistribute/isis/metric/node.def b/templates/protocols/ospf/redistribute/isis/metric/node.def new file mode 100644 index 00000000..58fd80d7 --- /dev/null +++ b/templates/protocols/ospf/redistribute/isis/metric/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Metric for redistributed routes +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777214; "metric must be between 0 and 16777214" +val_help: u32:0-16777214; Metric for redistributed routes diff --git a/templates/protocols/ospf/redistribute/isis/node.def b/templates/protocols/ospf/redistribute/isis/node.def new file mode 100644 index 00000000..1eaaa0de --- /dev/null +++ b/templates/protocols/ospf/redistribute/isis/node.def @@ -0,0 +1,21 @@ +help: Redistribute IS-IS routes +delete:expression: "touch /tmp/ospf-redist-isis.$PPID" +end: vtysh -c "configure terminal" \ + -c "router ospf" \ + -c "no redistribute isis"; + if [ -f "/tmp/ospf-redist-isis.$PPID" ]; then + rm -f /tmp/ospf-redist-isis.$PPID; + else + if [ -n "$VAR(./metric/@)" ]; then + COND="metric $VAR(./metric/@)"; + fi; + if [ -n "$VAR(./metric-type/@)" ]; then + COND="$COND metric-type $VAR(./metric-type/@)"; + fi; + if [ -n "$VAR(./route-map/@)" ]; then + COND="$COND route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf" \ + -c "redistribute isis $COND"; + fi; diff --git a/templates/protocols/ospf/redistribute/isis/route-map/node.def b/templates/protocols/ospf/redistribute/isis/route-map/node.def new file mode 100644 index 00000000..f2c6f7c2 --- /dev/null +++ b/templates/protocols/ospf/redistribute/isis/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" |