diff options
author | Stig Thormodsrud <stig@uffda.(none)> | 2007-10-12 16:48:14 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@uffda.(none)> | 2007-10-12 16:48:14 -0700 |
commit | 83331a0a334130cc438805c124fd05d93eddd5d0 (patch) | |
tree | b99cc192313d7803a4594084a65c041e7752e0dc /templates/protocols | |
parent | 0c23fb8b146cab3fbc48d4f8d45aae501e599a8a (diff) | |
download | vyatta-cfg-quagga-83331a0a334130cc438805c124fd05d93eddd5d0.tar.gz vyatta-cfg-quagga-83331a0a334130cc438805c124fd05d93eddd5d0.zip |
First cut of RIP new cli.
Fix filename on vyatta_policy.pl.
Diffstat (limited to 'templates/protocols')
40 files changed, 239 insertions, 2 deletions
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index f1e60caa..d36b505d 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -3,5 +3,5 @@ type: u32 help: "Configure a BGP Autonomous System on this router" # TODO: non-multinode parent syntax: $(@) >= 1 && $(@) <= 65535; "AS number must be between 1 and 65535" -create: "/usr/bin/vtysh -c \"configure terminal\" -c\"router bgp $(@)\" " -delete: "/usr/bin/vtysh -c \"configure terminal\" -c\"no router bgp $(@)\" " +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"no router bgp $(@)\" " diff --git a/templates/protocols/node.def b/templates/protocols/node.def new file mode 100644 index 00000000..3324e5fd --- /dev/null +++ b/templates/protocols/node.def @@ -0,0 +1 @@ +help: "Routing protocol configuration" diff --git a/templates/protocols/rip/default-information/node.def b/templates/protocols/rip/default-information/node.def new file mode 100644 index 00000000..e7e295cd --- /dev/null +++ b/templates/protocols/rip/default-information/node.def @@ -0,0 +1 @@ +help: "Control distribution of default route" diff --git a/templates/protocols/rip/default-information/originate/node.def b/templates/protocols/rip/default-information/originate/node.def new file mode 100644 index 00000000..97fe83aa --- /dev/null +++ b/templates/protocols/rip/default-information/originate/node.def @@ -0,0 +1,6 @@ +help: "Distribute a default route" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"default-information originate\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no default-information originate\" " + diff --git a/templates/protocols/rip/interface/node.def b/templates/protocols/rip/interface/node.def new file mode 100644 index 00000000..1c493597 --- /dev/null +++ b/templates/protocols/rip/interface/node.def @@ -0,0 +1,11 @@ +tag: +type: txt +help: "Interface name" +syntax: exec " \ + if [ -z \"`ip addr | grep $(@) `\" ]; then \ + echo ethernet interface $(@) doesn\\'t exist on this system ; \ + exit 1 ; \ + fi ; " +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"network $(@)\" " +update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"network $(@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"no network $(@)\" " diff --git a/templates/protocols/rip/interface/node.tag/network/node.def b/templates/protocols/rip/interface/node.tag/network/node.def new file mode 100644 index 00000000..7b226a4f --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.def @@ -0,0 +1,8 @@ +tag: +type: ipv4net +help: "RIP network" +syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)" +update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"network $(@)\"; " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no network $(@)\"; " diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def new file mode 100644 index 00000000..5cd0b2e8 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def @@ -0,0 +1,5 @@ +tag: +type: u32 +help: "MD5 authentication key ID" +syntax: $(@) >= 0 && $(@) <= 255; "ID must be between 1 and 255" + diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def new file mode 100644 index 00000000..8b0f3125 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def @@ -0,0 +1 @@ +help: "Authentication password" diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def new file mode 100644 index 00000000..3fd4e1a2 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def @@ -0,0 +1,8 @@ +type: txt +help: "Authentication password" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"ip rip authentication mode md5\" -c \"ip rip authentication key-chain $(../@)\" \ + -c \"key chain $(../@)\" -c \"key $(../@)\" -c \"key-string $(@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"no ip rip authentication mode md5\" -c \"no ip rip authentication key-chain $(../@)\" \ + -c \"no key chain $(../@)\" " diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def new file mode 100644 index 00000000..cd07a983 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def @@ -0,0 +1 @@ +help: "Authentication method" diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def new file mode 100644 index 00000000..2ab4fc5c --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def @@ -0,0 +1,6 @@ +type: txt +help: "Simple password authentication key" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"ip rip authentication mode text\" -c \"ip rip authentication string $(@)\"; " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"no ip rip authentication mode\" -c \"no ip rip authentication string $(@)\"; " diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def new file mode 100644 index 00000000..83b31f9c --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def @@ -0,0 +1,8 @@ +type: u32 +help: "ACL to be used in redistribution" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"distribute-list $(@) $(../@) $(../../../@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no distribute-list $(@) $(../@) $(../../../@)\" " + diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def new file mode 100644 index 00000000..0de08fbd --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def @@ -0,0 +1 @@ +help: "direction of redistribution" diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def new file mode 100644 index 00000000..0e7ea992 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def @@ -0,0 +1,7 @@ +type: u32 +help: "ACL to be used in redistribution" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"distribute-list $(@) $(../@) $(../../../@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no distribute-list $(@) $(../@) $(../../../@)\" " diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def new file mode 100644 index 00000000..5beb6cb9 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def @@ -0,0 +1,9 @@ +type: u32 +help: "Metric for this RIP network" +syntax: $(@) >= 1 && $(@) <= 255; "metric must be between 1 and 255" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"distance $(@) $(../@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no distance $(@) $(../@)\" " + + diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def new file mode 100644 index 00000000..3410022d --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def @@ -0,0 +1,5 @@ +help: "Set interface as recieve only" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"passive-interface $(../@)\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no passive-interface $(../@)\" " diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def new file mode 100644 index 00000000..82cb152a --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def @@ -0,0 +1,6 @@ +help: "enable split horizon on this interface" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../@)\" \ + -c \"ip rip split-horizon\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../@)\" \ + -c \"no ip rip split-horizon\" " + diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def new file mode 100644 index 00000000..a7631d44 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def @@ -0,0 +1,5 @@ +help: "with poison-reverse" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"ip rip split-horizon poisoned-reverse\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \ + -c \"no ip rip split-horizon\" -c \"ip rip split-horizon\" " diff --git a/templates/protocols/rip/interface/node.tag/node.def b/templates/protocols/rip/interface/node.tag/node.def new file mode 100644 index 00000000..d62d4841 --- /dev/null +++ b/templates/protocols/rip/interface/node.tag/node.def @@ -0,0 +1 @@ +help: "Configure RIP network" diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def new file mode 100644 index 00000000..d0f099cb --- /dev/null +++ b/templates/protocols/rip/node.def @@ -0,0 +1,4 @@ +help: "RIP options" +create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"no router rip\" " + diff --git a/templates/protocols/rip/redistribute/bgp/metric/node.def b/templates/protocols/rip/redistribute/bgp/metric/node.def new file mode 100644 index 00000000..270a810e --- /dev/null +++ b/templates/protocols/rip/redistribute/bgp/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: "Metric for redistributed routes" +syntax: $(@) >= 1 && $(@) <= 16; "metric must be between 1 and 16" diff --git a/templates/protocols/rip/redistribute/bgp/node.def b/templates/protocols/rip/redistribute/bgp/node.def new file mode 100644 index 00000000..727cff10 --- /dev/null +++ b/templates/protocols/rip/redistribute/bgp/node.def @@ -0,0 +1,16 @@ +help: "Redistribute BGP routes" +delete: "touch /tmp/rip-redist-bgp.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no redistribute bgp \"; \ + if [ -f \"/tmp/rip-redist-bgp.\\$PPID\" ]; then \ + rm -rf /tmp/rip-redist-bgp.\\$PPID; \ + else \ + if [ -n \"$(./metric/@)\" ]; then \ + COND=\"metric $(./metric/@)\"; + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + COND=\"\\$COND route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"redistribute bgp \\$COND\"; \ + fi; " diff --git a/templates/protocols/rip/redistribute/bgp/route-map/node.def b/templates/protocols/rip/redistribute/bgp/route-map/node.def new file mode 100644 index 00000000..f6e81288 --- /dev/null +++ b/templates/protocols/rip/redistribute/bgp/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: "Route map reference" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" + diff --git a/templates/protocols/rip/redistribute/connected/metric/node.def b/templates/protocols/rip/redistribute/connected/metric/node.def new file mode 100644 index 00000000..d7ca3c34 --- /dev/null +++ b/templates/protocols/rip/redistribute/connected/metric/node.def @@ -0,0 +1,6 @@ +type: u32 +help: "Metric for redistributed routes" +syntax: $(@) >= 1 && $(@) <= 16; "metric must be between 1 and 16" + + + diff --git a/templates/protocols/rip/redistribute/connected/node.def b/templates/protocols/rip/redistribute/connected/node.def new file mode 100644 index 00000000..9af10ca8 --- /dev/null +++ b/templates/protocols/rip/redistribute/connected/node.def @@ -0,0 +1,16 @@ +help: "Redistribute connected routes" +delete: "touch /tmp/rip-redist-connected.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no redistribute connected \"; \ + if [ -f \"/tmp/rip-redist-connected.\\$PPID\" ]; then \ + rm -rf /tmp/rip-redist-connected.\\$PPID; \ + else \ + if [ -n \"$(./metric/@)\" ]; then \ + COND=\"metric $(./metric/@)\"; + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + COND=\"\\$COND route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"redistribute connected \\$COND\"; \ + fi; " diff --git a/templates/protocols/rip/redistribute/connected/route-map/node.def b/templates/protocols/rip/redistribute/connected/route-map/node.def new file mode 100644 index 00000000..5ce5f0ab --- /dev/null +++ b/templates/protocols/rip/redistribute/connected/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: "Route map reference" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" diff --git a/templates/protocols/rip/redistribute/kernel/metric/node.def b/templates/protocols/rip/redistribute/kernel/metric/node.def new file mode 100644 index 00000000..270a810e --- /dev/null +++ b/templates/protocols/rip/redistribute/kernel/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: "Metric for redistributed routes" +syntax: $(@) >= 1 && $(@) <= 16; "metric must be between 1 and 16" diff --git a/templates/protocols/rip/redistribute/kernel/node.def b/templates/protocols/rip/redistribute/kernel/node.def new file mode 100644 index 00000000..6ca8d055 --- /dev/null +++ b/templates/protocols/rip/redistribute/kernel/node.def @@ -0,0 +1,16 @@ +help: "Redistribute kernel routes" +delete: "touch /tmp/rip-redist-kernel.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no redistribute kernel \"; \ + if [ -f \"/tmp/rip-redist-kernel.\\$PPID\" ]; then \ + rm -rf /tmp/rip-redist-kernel.\\$PPID; \ + else \ + if [ -n \"$(./metric/@)\" ]; then \ + COND=\"metric $(./metric/@)\"; + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + COND=\"\\$COND route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"redistribute kernel \\$COND\"; \ + fi; " diff --git a/templates/protocols/rip/redistribute/kernel/route-map/node.def b/templates/protocols/rip/redistribute/kernel/route-map/node.def new file mode 100644 index 00000000..5ce5f0ab --- /dev/null +++ b/templates/protocols/rip/redistribute/kernel/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: "Route map reference" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" diff --git a/templates/protocols/rip/redistribute/node.def b/templates/protocols/rip/redistribute/node.def new file mode 100644 index 00000000..e46c9122 --- /dev/null +++ b/templates/protocols/rip/redistribute/node.def @@ -0,0 +1 @@ +help: "Redistribute information from another routing protocol" diff --git a/templates/protocols/rip/redistribute/ospf/metric/node.def b/templates/protocols/rip/redistribute/ospf/metric/node.def new file mode 100644 index 00000000..01a2dda7 --- /dev/null +++ b/templates/protocols/rip/redistribute/ospf/metric/node.def @@ -0,0 +1,4 @@ +type: u32 +help: "Metric for redistributed routes" +syntax: $(@) >= 1 && $(@) <= 16; "metric must be between 1 and 16" + diff --git a/templates/protocols/rip/redistribute/ospf/node.def b/templates/protocols/rip/redistribute/ospf/node.def new file mode 100644 index 00000000..dfa076d9 --- /dev/null +++ b/templates/protocols/rip/redistribute/ospf/node.def @@ -0,0 +1,17 @@ +help: "Redistribute OSPF routes" +delete: "touch /tmp/rip-redist-ospf.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no redistribute ospf \"; \ + if [ -f \"/tmp/rip-redist-ospf.\\$PPID\" ]; then \ + rm -rf /tmp/rip-redist-ospf.\\$PPID; \ + else \ + if [ -n \"$(./metric/@)\" ]; then \ + COND=\"metric $(./metric/@)\"; + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + COND=\"\\$COND route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"redistribute ospf \\$COND\"; \ + fi; " + diff --git a/templates/protocols/rip/redistribute/ospf/route-map/node.def b/templates/protocols/rip/redistribute/ospf/route-map/node.def new file mode 100644 index 00000000..5ce5f0ab --- /dev/null +++ b/templates/protocols/rip/redistribute/ospf/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: "Route map reference" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" diff --git a/templates/protocols/rip/redistribute/static/metric/node.def b/templates/protocols/rip/redistribute/static/metric/node.def new file mode 100644 index 00000000..270a810e --- /dev/null +++ b/templates/protocols/rip/redistribute/static/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: "Metric for redistributed routes" +syntax: $(@) >= 1 && $(@) <= 16; "metric must be between 1 and 16" diff --git a/templates/protocols/rip/redistribute/static/node.def b/templates/protocols/rip/redistribute/static/node.def new file mode 100644 index 00000000..8cbbfc1b --- /dev/null +++ b/templates/protocols/rip/redistribute/static/node.def @@ -0,0 +1,16 @@ +help: "Redistribute static routes" +delete: "touch /tmp/rip-redist-static.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no redistribute static \"; \ + if [ -f \"/tmp/rip-redist-static.\\$PPID\" ]; then \ + rm -rf /tmp/rip-redist-static.\\$PPID; \ + else \ + if [ -n \"$(./metric/@)\" ]; then \ + COND=\"metric $(./metric/@)\"; + fi; \ + if [ -n \"$(./route-map/@)\" ]; then \ + COND=\"\\$COND route-map $(./route-map/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"redistribute static \\$COND\"; \ + fi; " diff --git a/templates/protocols/rip/redistribute/static/route-map/node.def b/templates/protocols/rip/redistribute/static/route-map/node.def new file mode 100644 index 00000000..5ce5f0ab --- /dev/null +++ b/templates/protocols/rip/redistribute/static/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: "Route map reference" +commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $(@)\" ";"route-map $(@) doesn't exist" diff --git a/templates/protocols/rip/timers/garbage-collection/node.def b/templates/protocols/rip/timers/garbage-collection/node.def new file mode 100644 index 00000000..3a70f5b6 --- /dev/null +++ b/templates/protocols/rip/timers/garbage-collection/node.def @@ -0,0 +1,6 @@ +type: u32 +default: 120 +help: "Garbage collection timer. Default is 120." +syntax: $(@) >= 5 && $(@) <= 2147483647; "Garbage collection timer must be between 5 and 2147483647" + + diff --git a/templates/protocols/rip/timers/node.def b/templates/protocols/rip/timers/node.def new file mode 100644 index 00000000..9f1d1ea2 --- /dev/null +++ b/templates/protocols/rip/timers/node.def @@ -0,0 +1,11 @@ +help: "Set RIP timer values" +delete: "touch /tmp/rip-timers.\\$PPID" +end: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"no timers basic\"; \ + if [ -f \"/tmp/rip-timers.\\$PPID\" ]; then \ + rm -rf /tmp/rip-timers.\\$PPID; \ + else \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \ + -c \"timers basic $(./update/@) $(./timeout/@) $(./garbage-collection/@)\"; \ + fi; " + diff --git a/templates/protocols/rip/timers/timeout/node.def b/templates/protocols/rip/timers/timeout/node.def new file mode 100644 index 00000000..2b01255f --- /dev/null +++ b/templates/protocols/rip/timers/timeout/node.def @@ -0,0 +1,4 @@ +type: u32 +default: 180 +help: "Routing information timeout timer. Default is 180." +syntax: $(@) >= 5 && $(@) <= 2147483647; "Timeout timer must be between 5 and 2147483647" diff --git a/templates/protocols/rip/timers/update/node.def b/templates/protocols/rip/timers/update/node.def new file mode 100644 index 00000000..e1aa59e7 --- /dev/null +++ b/templates/protocols/rip/timers/update/node.def @@ -0,0 +1,5 @@ +type: u32 +default: 30 +help: "Routing table update timer in seconds. Default is 30." +syntax: $(@) >= 5 && $(@) <= 2147483647; "Update timer must be between 5 and 2147483647" + |