From 1a9535e68042f67087cd400523dc42103292c2fe Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 13 Nov 2007 20:45:58 -0800 Subject: Add yet more OSPF configuration. --- .../protocols/ospf/default-information/node.def | 1 + .../default-information/originate/always/node.def | 1 + .../originate/metric-type/node.def | 4 ++++ .../default-information/originate/metric/node.def | 3 +++ .../ospf/default-information/originate/node.def | 21 +++++++++++++++++++++ .../originate/route-map/node.def | 2 ++ 6 files changed, 32 insertions(+) create mode 100644 templates/protocols/ospf/default-information/node.def create mode 100644 templates/protocols/ospf/default-information/originate/always/node.def create mode 100644 templates/protocols/ospf/default-information/originate/metric-type/node.def create mode 100644 templates/protocols/ospf/default-information/originate/metric/node.def create mode 100644 templates/protocols/ospf/default-information/originate/node.def create mode 100644 templates/protocols/ospf/default-information/originate/route-map/node.def (limited to 'templates/protocols/ospf/default-information') diff --git a/templates/protocols/ospf/default-information/node.def b/templates/protocols/ospf/default-information/node.def new file mode 100644 index 00000000..f50bef38 --- /dev/null +++ b/templates/protocols/ospf/default-information/node.def @@ -0,0 +1 @@ +help: "Control distribution of default information" diff --git a/templates/protocols/ospf/default-information/originate/always/node.def b/templates/protocols/ospf/default-information/originate/always/node.def new file mode 100644 index 00000000..e2a93034 --- /dev/null +++ b/templates/protocols/ospf/default-information/originate/always/node.def @@ -0,0 +1 @@ +help: "Always advertise default route" diff --git a/templates/protocols/ospf/default-information/originate/metric-type/node.def b/templates/protocols/ospf/default-information/originate/metric-type/node.def new file mode 100644 index 00000000..6e7f91b5 --- /dev/null +++ b/templates/protocols/ospf/default-information/originate/metric-type/node.def @@ -0,0 +1,4 @@ +type: txt +help: "OSPF metric type for default routes" +default: "2" +syntax: $(@) in "1", "2"; "Must be either 1 or 2" diff --git a/templates/protocols/ospf/default-information/originate/metric/node.def b/templates/protocols/ospf/default-information/originate/metric/node.def new file mode 100644 index 00000000..bef11e38 --- /dev/null +++ b/templates/protocols/ospf/default-information/originate/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: "OSPF default metric" +syntax: $(@) >= 0 && $(@) <= 16777214; "must be between 0-16777214" diff --git a/templates/protocols/ospf/default-information/originate/node.def b/templates/protocols/ospf/default-information/originate/node.def new file mode 100644 index 00000000..017473c2 --- /dev/null +++ b/templates/protocols/ospf/default-information/originate/node.def @@ -0,0 +1,21 @@ +help: "Distribute a default route" +delete: "touch /tmp/ospf-default-info.\\$PPID" +end: "if [ -f \"/tmp/ospf-default-info.\\$PPID\" ]; then \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router ospf\" \ + -c \"no default-information originate \"; \ + else \ + if [ -n \"$(./always/@)\" ]; then \ + PARM=\"always\"; \ + fi; \ + if [ -n \"$(./metric/@)\" ]; then \ + PARM=\"\\$PARM metric $(./metric/@)\"; \ + fi; \ + if [ -n \"$(./metric-type/@)\" ]; then \ + PARM=\"\\$PARM metric-type $(./metric-type/@)\"; \ + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + PARM=\"\\$PARM route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router ospf\" \ + -c \"default-information originate \\$PARM\"; \ + fi; " diff --git a/templates/protocols/ospf/default-information/originate/route-map/node.def b/templates/protocols/ospf/default-information/originate/route-map/node.def new file mode 100644 index 00000000..5b4f587e --- /dev/null +++ b/templates/protocols/ospf/default-information/originate/route-map/node.def @@ -0,0 +1,2 @@ +type: txt +help: "Route map reference" -- cgit v1.2.3