diff options
Diffstat (limited to 'templates/protocols/ospf/default-information')
6 files changed, 32 insertions, 0 deletions
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" |