-
Notifications
You must be signed in to change notification settings - Fork 79
lag module: Model peerlink as regular lag link #2084
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
base: dev
Are you sure you want to change the base?
Conversation
96c1995
to
10c28ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start with the obvious one: is there a reason you couldn't add "allocation: p2p" to the global P2P pool?
It is supposed to be used for P2P links anyway, and uses /30 prefix, so there cannot be more than two nodes attached to it. Alternatively, one could define custom pool and use it for peer link VLANs.
Both options are better (IMO) than adding random global attributes.
I suggested that in the past (#1611) but you disagreed at the time. Happy to revisit |
Well, thanks for pointing that out ;) The problem was (and still is) that using P2P allocation strategy on a VLAN link masks the fact that an IRB VLAN has a single prefix. Not specifying the p2p allocation strategy crashes the allocation process, alerting the user to the fact that something weird is going on. And now we uncovered another gotcha: you're doing too much tweaking. I never got that far because I stumbled on the "new global pool" showstopper. |
Is there supposed to be a default VLAN to be used on that link for the global IP routing, or is it just a VLAN trunk like any other trunk?
There's a showstopper right there ;)
There's absolutely no need for that. Peer links are established between devices of the same type anyway, and if a device does not support mixed trunks, they you use IRB for the global IP routing VLAN. Any further device-specific limitations can be addressed in device quirks. Please (always) try to modify the minimum amount of data structures necessary. We're learned the hard way that doing anything else creates unpredictable effects in the future.
I have no problem with this (just skip the VLAN assignment on the peer link), but it has to be documented.
I don't see a need for the "allow all" trunks from the topology perspective, but I have no problem with an internal flag like vlan._all_vlans that would be used in VLAN configuration templates instead of checking the peerlink interface name or type.
As you can assign any pool to any VLAN, I fail to see why this is relevant ;) |
I did try it - it results in an address allocation failure for the |
Ironically, this is exactly the reason why I opted for a separate |
All VLANs - including the default VLAN - need to be allowed on the peerlink. On Cumulus the default VLAN is not used for IP routing - no IP address assigned to it - but removing it causes test cases to fail (without clear indications of why) |
BTW, there's no need to set allocation: p2p on the P2P pool. You can set prefix.allocation on any link (or VLAN) and still get the IPv4/IPv6 address assigned from the pool. For example:
|
@@ -113,6 +113,12 @@ links: | |||
mlag.peergroup: True # (also) used to derive a unique MAC address for this group of MLAG peers | |||
``` | |||
|
|||
### Peerlink configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This left me a bit confused. I think it would be nice to have two short examples, one of them documenting how the peer link can be used as pure routed link (although we know there are other things going on in the background), another one describing how to use VLANs on the peer link (example use case: VRF Lite)
It's also worth mentioning that you chose that netlab configures "allow all VLANs" on the peer link. That is not always the case in real-life deployments.
I did try that first too, but it didn't seem to work. I'll try again Update: Here's why that didn't work in this case #2090 |
Modeling the peer VLAN explicitly, to allow configuration of features like OSPF between the mlag peers
* Remove custom IP subnets, use p2p pool instead * Fix warning about Linux bridge blocking LACP (removed links don't pose an issue)
* Set 'allocation' to 'p2p' for the global pool
…n prefix is set to False
Currently the link between MLAG peers is crafted internally within the lag module, using specific internal mechanisms to assign IP addresses and making it impossible to configure features such as OSPF or BGP between the peers.
This PR models the peerlink as a regular lag link with a VLAN trunk, enabling the full suite of Netlab features to be configured between the peers:
prefix
orpool
, or leave default to get VLANlan
pool addressingFixes #1909
Note: Arubacx templates are modified but will need further adjustments and testing (like defining the vlan that gets created for peering, similar to eos)
Testing: added a test for OSPF over peerlink
NETLAB_DEVICE=cumulus_nvue NETLAB_PROVIDER=libvirt ./device-module-test -v lag
NETLAB_DEVICE=eos NETLAB_PROVIDER=clab ./device-module-test -v lag
Breaking changes:
backup destination
IP is now taken fromintf.lag.mlag.peer_backup_ip
instead ofintf.lag.mlag.peer
Implementation notes:
irb
mode with a prefix, overriding the mode toroute
at the interface level_allow_all
introduced to model this