summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-05-04 00:19:57 +0200
committerDaniil Baturin <daniil@baturin.org>2017-09-14 14:06:13 +0200
commit881a3667a924fe7396c6b975d6535bef0e9a02c3 (patch)
treeb8da2f0ac509201e5e1aebd95097649085b6fb3f /templates/interfaces
parent1c2c0e9270d10f00d0b18ebf45a7a23a6b763531 (diff)
downloadvyatta-cfg-system-881a3667a924fe7396c6b975d6535bef0e9a02c3.tar.gz
vyatta-cfg-system-881a3667a924fe7396c6b975d6535bef0e9a02c3.zip
Bug #410: add an option for ARP cache timeout.
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def9
-rw-r--r--templates/interfaces/bridge/node.tag/ip/arp-cache-timeout/node.def9
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/arp-cache-timeout/node.def10
-rw-r--r--templates/interfaces/pseudo-ethernet/node.tag/ip/arp-cache-timeout/node.def9
-rw-r--r--templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def9
5 files changed, 46 insertions, 0 deletions
diff --git a/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def
new file mode 100644
index 00000000..4441914c
--- /dev/null
+++ b/templates/interfaces/bonding/node.tag/ip/arp-cache-timeout/node.def
@@ -0,0 +1,9 @@
+help: ARP cache entry timeout in seconds
+
+type: u32
+
+create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
diff --git a/templates/interfaces/bridge/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/bridge/node.tag/ip/arp-cache-timeout/node.def
new file mode 100644
index 00000000..4441914c
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/ip/arp-cache-timeout/node.def
@@ -0,0 +1,9 @@
+help: ARP cache entry timeout in seconds
+
+type: u32
+
+create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
diff --git a/templates/interfaces/ethernet/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/ethernet/node.tag/ip/arp-cache-timeout/node.def
new file mode 100644
index 00000000..b92fbba4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/arp-cache-timeout/node.def
@@ -0,0 +1,10 @@
+help: ARP cache entry timeout in seconds
+
+type: u32
+
+create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
diff --git a/templates/interfaces/pseudo-ethernet/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/pseudo-ethernet/node.tag/ip/arp-cache-timeout/node.def
new file mode 100644
index 00000000..4441914c
--- /dev/null
+++ b/templates/interfaces/pseudo-ethernet/node.tag/ip/arp-cache-timeout/node.def
@@ -0,0 +1,9 @@
+help: ARP cache entry timeout in seconds
+
+type: u32
+
+create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
diff --git a/templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def b/templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def
new file mode 100644
index 00000000..4441914c
--- /dev/null
+++ b/templates/interfaces/vxlan/node.tag/ip/arp-cache-timeout/node.def
@@ -0,0 +1,9 @@
+help: ARP cache entry timeout in seconds
+
+type: u32
+
+create:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+update:expression: "sudo sh -c \"echo $((1000*$VAR(@))) > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "
+
+delete:expression: "sudo sh -c \"echo 30000 > /proc/sys/net/ipv4/neigh/$VAR(../../@)/base_reachable_time_ms\" "