summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/bond.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-10 22:33:25 +0200
committerChristian Poessinger <christian@poessinger.com>2022-07-10 22:35:50 +0200
commitcabfd006bed9cd2d1512cb313616a8e97fe29b9e (patch)
treebf2f2904165011fcd60d8b87372afb1357d063c2 /python/vyos/ifconfig/bond.py
parentdaddb0ad7812843f64a7ae0bf4b5e15db7b1758e (diff)
downloadvyos-1x-cabfd006bed9cd2d1512cb313616a8e97fe29b9e.tar.gz
vyos-1x-cabfd006bed9cd2d1512cb313616a8e97fe29b9e.zip
bond: T1557: re-add miimon configuration - lost in translation
Diffstat (limited to 'python/vyos/ifconfig/bond.py')
-rw-r--r--python/vyos/ifconfig/bond.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py
index c1610ee67..33745ceb3 100644
--- a/python/vyos/ifconfig/bond.py
+++ b/python/vyos/ifconfig/bond.py
@@ -179,6 +179,21 @@ class BondIf(Interface):
"""
self.set_interface('bond_lacp_rate', slow_fast)
+ def set_miimon_interval(self, interval):
+ """
+ Specifies the MII link monitoring frequency in milliseconds. This
+ determines how often the link state of each slave is inspected for link
+ failures. A value of zero disables MII link monitoring. A value of 100
+ is a good starting point.
+
+ The default value is 0.
+
+ Example:
+ >>> from vyos.ifconfig import BondIf
+ >>> BondIf('bond0').set_miimon_interval('100')
+ """
+ return self.set_interface('bond_miimon', interval)
+
def set_arp_interval(self, interval):
"""
Specifies the ARP link monitoring frequency in milliseconds.
@@ -372,6 +387,8 @@ class BondIf(Interface):
if 'shutdown_required' in config:
self.set_admin_state('down')
+ # Specifies the MII link monitoring frequency in milliseconds
+ self.set_miimon_interval('250')
# Bonding transmit hash policy
value = config.get('hash_policy')