Arista AVD Bug -MLAG iBGP VLAN ID Allocation Issue - Day One Bug
See original GitHub issueIssue Summary
The issue appears to be a day one BUG in the VLAN-ID calculation done in the MLAG VLAN jinja template.
Below is the current formula used to derive the iBGP MLAG VLAN in the latest AVD:
{{ vrf.mlag_ibgp_peering_vlan | arista.avd.default(mlag_ibgp_peering_vrfs.base_vlan + (vrf.vrf_vni - 1)) }}:
From above you are using the Base VLAN = 3000, then add it to the VRF VNI ID (this is customer configurable value and as per rfc a 24bits value), then you subtract 1, meaning if VRF VNI ID is set to 5001
as an example, the allocated VLAN ID for the mlag BGP peering would be 3000 + 5001 -1 =8000
, which breaks the maximum supported VLAN number of 4094.
The above formula is wrong and it is bug in AVD.
In the previous AVD version, below is the formula used:
mlag_ibgp_peering_vrfs.base_vlan + vrf_vni
Both formulas constraint users to a maximum value of 1093
to be used for the VRF VNI which should be a 24bits value.
Can this formulas be changed please?
Cheers, jide
Which component(s) of AVD impacted
No response
How do you run AVD ?
No response
Steps to reproduce
set VRF VNI value to any value greater than 1093 in the tenant template file in AVD.
Relevant log output
Leaf config output:
!
vlan 8000
name MLAG_iBGP_xxx
trunk group LEAF_PEER_L3
!
Contributing Guide
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top GitHub Comments
Hello @smeo83,
There was a modification made that should lift this limitation: https://github.com/aristanetworks/ansible-avd/pull/1488 (in AVD 3.3.0) with the introdiction of a
vrf_id
. Indeed in 2.2.1 you are not able to achieve this.Basically the formula would now work as described in the doc:
Where the
vrf_id
takes precedence over thevrf_vni
for the computation of the VLAN which gives you some freedom to set thevrf_vni
you want.As an example, if you want
vrf_vni = 50000
is the following (using AVD 3.4.0 in my case):Renders on a leaf with the VRF:
Thank you for the details @smeo83.
To add to the answer from @gmuloc, I don’t think we can write an algorithm that will suite everyone. Instead we chose to document this limitation, and expose a direct per-vrf setting, to allow you to set the vlan id yourself. I Checked v2.2.1, and this knob is also available in that version. Check under the network-services documentation.
HTH.