Skip to content

Commit

Permalink
lag: Disallow direct IP addressing on MLAG interfaces, not supported …
Browse files Browse the repository at this point in the history
…on most (all?) platforms
  • Loading branch information
jbemmel committed Dec 31, 2024
1 parent 07d612c commit 70f9c00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netsim/modules/lag.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,12 @@ def node_post_transform(self, node: Box, topology: Box) -> None:
log.error(f'Node {node.name} does not support passive LACP configured on interface {i.ifname}',
category=log.IncorrectAttr,
module='lag')
if i.lag.get('mlag',False) is True:
if i.lag.get('_mlag',False) is True:
uses_mlag = True
if 'ipv4' in i or 'ipv6' in i:
log.error(f'Node {node.name}: IP address directly on MLAG interface {i.ifname} is not supported, use a VLAN instead',
category=log.IncorrectAttr,
module='lag')

if uses_mlag and not has_peerlink:
log.error(f'Node {node.name} uses MLAG but has no peerlink (lag with {PEERLINK_ID_ATT}) configured',
Expand Down

0 comments on commit 70f9c00

Please sign in to comment.