Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lag: Disallow direct IP addressing on MLAG interfaces #1713

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading