-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fails to create VRF-bound BGP instance with different ASN than default, if VRF has an L3VNI #16152
Comments
It seems to like the conditions for that issue is different. In particular, there is no EVPN/L3VNI in that configuration, which is a requirement for the bug to trigger in mine. That said, it could of course be that there is a single root cause at play here that can be triggered in multiple ways. |
Strange. Just double-checking, is the L3VNI visible to FRR for you prior to the attempted creation of the BGP instance?
Not sure if it matters, but I'm running kernel 6.8.9-300.fc40.x86_64 (Fedora 40). |
Yes, pardon, master is affected also. Will check what's going on, and let you know. |
Overall yes, this is technically the same issue as #9537. TL;DR; When we configure |
@toreanderson are you able to test a patch (compile)? |
Assuming the build process is relatively straight forward (or well documented if not), certainly. |
Configuration: ``` vtysh <<EOF configure vrf vrf100 vni 10100 exit-vrf router bgp 50 address-family l2vpn evpn advertise-all-vni exit-address-family exit router bgp 100 vrf vrf100 exit EOF ``` TL;DR; When we configure `advertise-all-vni` (in this case), a new BGP instance is created with the name vrf100, and ASN 50. Next, when we create `router bgp 100 vrf vrf100`, we look for the BGP instance with the same name and we found it, but ASNs are different 50 vs. 100. Every such a new auto created instance is flagged with BGP_VRF_AUTO. After the fix: ``` router bgp 50 ! address-family l2vpn evpn advertise-all-vni exit-address-family exit ! router bgp 100 vrf vrf100 exit ! end donatas.net(config)# router bgp 51 BGP is already running; AS is 50 donatas.net(config)# router bgp 50 donatas.net(config-router)# router bgp 101 vrf vrf100 BGP is already running; AS is 100 donatas.net(config)# router bgp 100 vrf vrf100 donatas.net(config-router)# ``` Fixes: FRRouting#16152 Fixes: FRRouting#9537 Signed-off-by: Donatas Abraitis <[email protected]>
The patch is here #16159, you could also wait for the artifacts to be compiled and install .deb, .rpm if CI passes of course. |
Tested build artifacts on Debian 12:
I can reprocue the issue on the former, but not on the latter. LGTM! 👌 |
Configuration: ``` vtysh <<EOF configure vrf vrf100 vni 10100 exit-vrf router bgp 50 address-family l2vpn evpn advertise-all-vni exit-address-family exit router bgp 100 vrf vrf100 exit EOF ``` TL;DR; When we configure `advertise-all-vni` (in this case), a new BGP instance is created with the name vrf100, and ASN 50. Next, when we create `router bgp 100 vrf vrf100`, we look for the BGP instance with the same name and we found it, but ASNs are different 50 vs. 100. Every such a new auto created instance is flagged with BGP_VRF_AUTO. After the fix: ``` router bgp 50 ! address-family l2vpn evpn advertise-all-vni exit-address-family exit ! router bgp 100 vrf vrf100 exit ! end donatas.net(config)# router bgp 51 BGP is already running; AS is 50 donatas.net(config)# router bgp 50 donatas.net(config-router)# router bgp 101 vrf vrf100 BGP is already running; AS is 100 donatas.net(config)# router bgp 100 vrf vrf100 donatas.net(config-router)# ``` Fixes: FRRouting#16152 Fixes: FRRouting#9537 Signed-off-by: Donatas Abraitis <[email protected]>
Description
When trying to create a VRF-bound BGP instance that uses a different ASN than the default BGP instance, FRR will refuse to do so with the error message
BGP is already running; AS is X
, where X is the ASN of the default BGP instance.This only happens if the VRF has a L3VNI.
Version
How to reproduce
Starting with an unconfigured FRR instance already running, issue the following commands:
Expected behavior
The commands should complete without issue.
(Note that the FRR documentation makes it clear that using different ASNs in different VRFs is supposed to work.)
Actual behavior
The VRF-bound BGP instance is not created. The script fails with the following output:
Additional context
If the L3VNI is bound to the VRF after the BGP instance is created, it works. In other words, after changing the script as follows, the configuration successfully loads:
However, if this configuration is made persistent with
write
, thevrf
section is located above therouter bgp
sections in the generated configuration file, causing it to not load correctly when FRR (re)starts.Checklist
The text was updated successfully, but these errors were encountered: