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

BGP_EVPN_RT5 does not work if using a RR instead #18371

Open
2 tasks done
pguibert6WIND opened this issue Mar 12, 2025 · 0 comments
Open
2 tasks done

BGP_EVPN_RT5 does not work if using a RR instead #18371

pguibert6WIND opened this issue Mar 12, 2025 · 0 comments
Labels
bug evpn triage Needs further investigation

Comments

@pguibert6WIND
Copy link
Member

pguibert6WIND commented Mar 12, 2025

Description

Currently, a 65000 domain has been created between R1 and R2, and R2 sends EVPN updates to R1.
If I introduce a RR machine in between to act as route reflector for EVPN, then, the test does not work anymore.

Version

upstream branch

How to reproduce

Take pull request #18358
Apply patch https://gist.github.com/pguibert6WIND/db2e805fcac65f56ecbdc70caba243fc

Run the bgp_evpn_rt5 test.

Expected behavior

The test where IPv6 updates are removed should work.

Actual behavior

================================================================================ FAILURES =================================================================================
__________________________________________________________________ test_router_check_evpn_contexts_again __________________________________________________________________

    def test_router_check_evpn_contexts_again():
        """
        Check EVPN nexthops and RMAC number  are correctly configured
        """
        tgen = get_topogen()
        if tgen.routers_have_failure():
            pytest.skip(tgen.errors)
    
>       _test_router_check_evpn_contexts(tgen.gears["r1"], ipv4_only=True)

test_bgp_evpn.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

router = <lib.topogen.TopoRouter object at 0x77b953686f80>, ipv4_only = True

    def _test_router_check_evpn_contexts(router, ipv4_only=False):
        """
        Check EVPN nexthops and RMAC number  are correctly configured
        """
        if ipv4_only:
            expected = {
                "101": {
                    "numNextHops": 1,
                    "192.168.100.41": {
                        "nexthopIp": "192.168.100.41",
                    },
                }
            }
        else:
            expected = {
                "101": {
                    "numNextHops": 2,
                    "192.168.100.41": {
                        "nexthopIp": "192.168.100.41",
                    },
                    "::ffff:192.168.100.41": {
                        "nexthopIp": "::ffff:192.168.100.41",
                    },
                }
            }
        result = topotest.router_json_cmp(
            router, "show evpn next-hops vni all json", expected
        )
        assert result is None, "evpn next-hops check failed"
    
        expected = {"101": {"numRmacs": 1}}
        result = topotest.router_json_cmp(router, "show evpn rmac vni all json", expected)
>       assert result is None, "evpn rmac number check failed"
E       AssertionError: evpn rmac number check failed
E       assert Generated JSON diff error report:
E         
E         > $: expected has key '101' which is not present in output

test_bgp_evpn.py:408: AssertionError
============================================================================ warnings summary =============================================================================
../../../../../usr/local/lib/python3.10/dist-packages/_pytest/config/__init__.py:1277
  /usr/local/lib/python3.10/dist-packages/_pytest/config/__init__.py:1277: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: xdist
    self._mark_plugins_for_rewrite(hook)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
------------------------------------------------------------ generated xml file: /tmp/topotests/topotests.xml -------------------------------------------------------------
========================================================================= short test summary info =========================================================================
FAILED test_bgp_evpn.py::test_router_check_evpn_contexts_again - AssertionError: evpn rmac number check failed
=========================================================== 1 failed, 7 passed, 4 skipped, 1 warning in 18.63s

Additional context

The troubleshooting indicates that the order of the ROUTE_ADD from BGP to ZEBRA are important. With a Route Reflector, nexthop tracking is also used for the VTEP IPv4, and in my case the IPv6 route with nexthop ::ffff:192.168.100.41 is added first.
When receiving the ROUTE_DELETE during the test, the current nexthop is really deleted, and the remote mac contexts are emptied.

One possible solution would consist in this solution:
I think the issue could be solved if we really were supporting IPv6 underlay support. Having the fwd_info context in zebra_evpn_mac.h would permit doing a mapping with the corresponding V4 and V6 nexthops.

Any other solutions may be possible.

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@pguibert6WIND pguibert6WIND added bug evpn triage Needs further investigation labels Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug evpn triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

1 participant