diff --git a/bundles/systemd-networkd/files/template-bond.netdev b/bundles/systemd-networkd/files/template-bond.netdev index 08b14c3..3c023b7 100644 --- a/bundles/systemd-networkd/files/template-bond.netdev +++ b/bundles/systemd-networkd/files/template-bond.netdev @@ -4,3 +4,12 @@ Kind=bond [Bond] Mode=${mode} +% if mode in {'balance-rr', '802.3ad', 'balance-tlp'}: +TransmitHashPolicy=layer3+4 +% endif +MIIMonitorSec=1s +LACPTransmitRate=fast +% if mode == '802.3ad': +AdSelect=bandwidth +AdActorSystemPriority=${prio} +% endif diff --git a/bundles/systemd-networkd/items.py b/bundles/systemd-networkd/items.py index c085c17..fd3ef9c 100644 --- a/bundles/systemd-networkd/items.py +++ b/bundles/systemd-networkd/items.py @@ -72,6 +72,7 @@ for bond, config in node.metadata.get('systemd-networkd', {}).get('bonds', {}).i 'context': { 'bond': bond, 'mode': config.get('mode', '802.3ad'), + 'prio': config.get('priority', '32768'), }, 'needed_by': { 'svc_systemd:systemd-networkd', diff --git a/nodes/home/nas.py b/nodes/home/nas.py index 4c96ba0..01c454e 100644 --- a/nodes/home/nas.py +++ b/nodes/home/nas.py @@ -43,6 +43,7 @@ nodes['home.nas'] = { 'enp8*', 'enp9*', }, + 'priority': '32770', }, }, 'bridges': {