ipspace / netlab

Making virtual networking labs suck less
https://netlab.tools
Other
409 stars 58 forks source link

New module for link aggregation support (mvp) #1143

Open jbemmel opened 2 months ago

jbemmel commented 2 months ago

Example:

links:
- s1:
  s2:
  vlan.trunk: [ irb, route ]
  vlan.native: irb

- s1:
   lag.id: 1
   lag.peer: s2
  h1:

- s2:
   lag.id: 1
   lag.peer: s1
  h1:

For discussion - syntax could also work like vlans, declaring the links

ipspace commented 2 months ago

I like it the generic idea, and having lag.id on an interface is probably the way to go. However, the whole thing is way more complex than what can be done with your approach... unless we limit ourselves to LAG-with-VLAN-trunks, but then I know we'll pay a heavy price sometime in the future (see also: VLAN module).

For example, here's a simplest possible topology modeling a L3 LAG link between two adjacent nodes:

module: [ lag ]
nodes: [ r1, r2 ]
links:
- r1:
  r2:
  lag.id: 1
- r1:
  r2:
  lag.id: 1

You approach (fixing the interface names afterwards) would fail miserably, as we have to assign a single subnet to the LAG link. I think we have to do something similar to how we handle VLAN trunks and create extra virtual links for LAGs, turning the physical link into a L2-only link.

jbemmel commented 2 months ago

Some changes - highlights:

TODO:

ipspace commented 1 month ago

Is this ready or are you still working on it?