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

Linux: add lag support and bonding plugin for non-lag cases #1624

Open
wants to merge 46 commits into
base: dev
Choose a base branch
from

Conversation

jbemmel
Copy link
Collaborator

@jbemmel jbemmel commented Dec 8, 2024

  • Refactor and reuse FRR logic for bond creation on Linux, both for the lag module and for the bonding plugin
  • Support all the Linux bonding modes, split into:
    • lag module: [ 802.3ad, balance-rr, balance-xor, broadcast ]
    • bonding plugin: [ active-backup, balance-tlb, balance-alb ]

In all cases, bonding devices are created in initial such that any IP addresses can be assigned. Bond/lag members are then added in the respective lag module and bonding plugin

Copy link
Owner

@ipspace ipspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor details plus a major problem: we don't get the Linux static routes for the lab pools (they are supposed to point to the first data-plane interface), so the Linux host cannot reach anything but the adjacent router.

Fix the nits and I'll add the static routes part.

netsim/devices/linux.yml Show resolved Hide resolved
netsim/ansible/templates/lag/linux.j2 Outdated Show resolved Hide resolved
@ipspace
Copy link
Owner

ipspace commented Dec 9, 2024

Also, just wondering: how does netplan-based Ubuntu configuration work with handcrafted bond devices?

@jbemmel jbemmel marked this pull request as draft December 9, 2024 14:25
@jbemmel
Copy link
Collaborator Author

jbemmel commented Dec 9, 2024

Also, just wondering: how does netplan-based Ubuntu configuration work with handcrafted bond devices?

It shows them as "unmanaged" just like the 'lo' device (odd to see that), but I agree it would be nicer to craft netplan configs where available. Will adjust

@jbemmel jbemmel force-pushed the linux_add_lag_support branch from 33e1ee4 to d20c7ef Compare December 10, 2024 17:36
@ipspace
Copy link
Owner

ipspace commented Dec 11, 2024

Fix the nits and I'll add the static routes part.

Static route issue is tracked in #1641. I will probably go for a simple fix in the configuration template (that code is ancient)

…the device bond1 instead of eth1

IP allocation doesn't work the same - possibly some dependency on link.type
( this is an example why Ivan doesn't like link.type=='lag'... )
Moved to a new 'bonding' plugin as it is not link aggregation
Supports the Linux bonding modes that work with autonomous ports
@jbemmel jbemmel force-pushed the linux_add_lag_support branch from a884b6f to 1cb4cea Compare December 15, 2024 19:26
@jbemmel jbemmel changed the title Linux: add lag support Linux: add lag support and bonding plugin for non-lag cases Dec 15, 2024
@jbemmel jbemmel marked this pull request as ready for review December 16, 2024 03:44
@jbemmel
Copy link
Collaborator Author

jbemmel commented Dec 16, 2024

Ready to add the static route bits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants