frr icon indicating copy to clipboard operation
frr copied to clipboard

Unable to filter EVPN type 5 routes with ip prefix-list

Open fdomain opened this issue 3 years ago • 5 comments


Describe the bug

In a L2VPN EVPN setup, when trying to filter EVPN type-5 routes with an ip/ipv6 prefix-list, it drops everything.

[X] Did you check if this is a duplicate issue? [ ] Did you test it on the latest FRRouting/frr master branch?

To Reproduce

Consider the following EVPN type 5 route received on the FRR instance

*> [5]:[0]:[128]:[2001:db8::cafe/128]
                    10.0.0.1
                                             0             0 64528 i
                    RT:64528:3 ET:8 Rmac:8a:2e:fb:2e:fb:87

Here is a basic configuration:

route-map RM-TEST-IN permit 10
  match evpn route-type prefix
exit
!
router bgp 65001
  address-family l2vpn evpn
    neighbor 10.0.0.1 route-map RM-TEST-IN in
!

Route is received and accepted:

r1# show bgp l2vpn evpn neighbors 10.0.0.1 routes 
BGP table version is 9, local router ID is 10.0.0.254
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN type-1 prefix: [1]:[EthTag]:[ESI]:[IPlen]:[VTEP-IP]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 10.0.0.1:3
*> [5]:[0]:[128]:[2001:db8::cafe]
                    10.0.0.1
                                             0             0 64528 i
                    RT:64528:3 ET:8 Rmac:8a:2e:fb:2e:fb:87

We apply a "match prefix list" in addition:

conf t
ipv6 prefix-list TEST seq 5 permit 2001:db8::cafe/128
!
route-map RM-TEST-IN permit 10
  match ipv6 address prefix-list TEST
!
end

The route isn't accepted anymore:

r1# show bgp l2vpn evpn neighbors 10.0.0.1 routes
No prefixes displayed, 155 exist

Expected behavior

Route is received as long as it matches the prefix-list defined.

r1# show bgp l2vpn evpn neighbors 10.0.0.1 routes 
BGP table version is 9, local router ID is 10.0.0.254
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN type-1 prefix: [1]:[EthTag]:[ESI]:[IPlen]:[VTEP-IP]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 10.0.0.1:3
*> [5]:[0]:[128]:[2001:db8::cafe]
                    10.0.0.1
                                             0             0 64528 i
                    RT:64528:3 ET:8 Rmac:8a:2e:fb:2e:fb:87

Screenshots

Versions

  • OS Version: CentOS8
  • Kernel: Linux 5.16
  • FRR Version: 8.1

Additional context

  • This is very similar to https://github.com/FRRouting/frr/issues/8784

  • It doesnt work either for outbound or inbound filtering

  • Apparently it should be patched with the following PR https://github.com/FRRouting/frr/pull/8647 but it hasn't been merged yet.

fdomain avatar Feb 10 '22 16:02 fdomain

Hello, do you have any update on this ?

fdomain avatar Apr 14 '22 08:04 fdomain

Hello @ton31337, do you have any information about that ? https://github.com/FRRouting/frr/pull/8647 is still pending for a review

fdomain avatar Jun 30 '22 14:06 fdomain

Hello @ton31337 and @sworleys, sorry to ask you again, but is there any chance to have https://github.com/FRRouting/frr/pull/8647 merged soon? It would be very useful for us to be able to filter on prefixes with EVPN type 5 routes.

fdomain avatar Aug 22 '22 10:08 fdomain

Need to fix merge conflicts first and we might ship it.

ton31337 avatar Aug 22 '22 10:08 ton31337

@ton31337 fixed conflicts

sworleys avatar Aug 22 '22 18:08 sworleys

Hello @ton31337 and @sworleys , https://github.com/FRRouting/frr/pull/8647 has been approved but still not merged, is there anything preventing the change to be merged?

fdomain avatar Oct 18 '22 07:10 fdomain

@fdomain merged, can you test?

ton31337 avatar Oct 18 '22 11:10 ton31337

great thanks, I'll test it soon and get back to you.

fdomain avatar Oct 18 '22 12:10 fdomain

@ton31337, I've just built and tested master branch on CentOS8, and I confirm the prefix list filtering works for EVPN now, but I noticed a regression for other evpn filters:

  • using match evpn route-type prefix doesn't work anymore, all routes seems to be dropped (including routes of type prefix)
  • using match evpn vni <vni id> doesn't filter anything, it still accepts every prefixes for any vni These 2 commands were working on FRR v8.3.1.

Don't know if it's directly linked to the PR, I tried to build v8.3.1 with the patch from https://github.com/FRRouting/frr/pull/8647 but with no success (diff is too large, files have been changed in the meantime).

fdomain avatar Oct 18 '22 15:10 fdomain

Don't know if it's directly linked to the PR, I tried to build v8.3.1 with the patch from #8647 but with no success (diff is too large, files have been changed in the meantime).

Did you confirm it worked on master before the changes in the PR?

sworleys avatar Oct 18 '22 15:10 sworleys

I've just tried with master with commit 2944807553e5ce368c0e47c3a95db3e573eae368 (the one preceding your changes if I'm not mistaking), and these commands are still working, but not the prefix list filtering obviously.

fdomain avatar Oct 18 '22 15:10 fdomain

I've just tried with master with commit 2944807 (the one preceding your changes if I'm not mistaking), and these commands are still working, but not the prefix list filtering obviously.

Thanks, will look into it then.

sworleys avatar Oct 18 '22 15:10 sworleys

Hello @sworleys , I tested FRR v8.4.1 and the match ip address command still doesn't work for EVPN type 5 routes. Did you have time to look into this ?

However the regression I mentioned in a previous post disappeared : I confirm match evpn route-type prefix and match evpn vni <vni id> work correctly in this version.

Thanks for your help

fdomain avatar Jan 12 '23 11:01 fdomain

Hello @ton31337 , would you have time to look into this issue ?

fdomain avatar Jan 25 '23 13:01 fdomain

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Aug 01 '23 02:08 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Aug 01 '23 02:08 frrbot[bot]

Hello @sworleys and @ton31337, I'm just leaving another comment to avoid this issue to be closed. Would you have time to look into it ? Let me know if I can be of any help.

fdomain avatar Aug 01 '23 07:08 fdomain

This issue will no longer be automatically closed.

frrbot[bot] avatar Aug 01 '23 07:08 frrbot[bot]

Hi @aderumier, it seems that you're using match evpn route-type matcher. This ticket was initially opened for the match ip address prefix-list matcher that doesn't work with EVPN prefixes, so it might be not the right place to report it.

However, I'd be interested to know if you've managed to get the match ip address prefix-list to work with EVPN on your setup ?

fdomain avatar Dec 01 '23 15:12 fdomain

@fdomain I remember that prefix-list was not working too, I can do test next week if you want.
I'll delete my comment as it's a different case, and wirte it to other issue.

aderumier avatar Dec 01 '23 16:12 aderumier

@fdomain ok, prefix-list filtering are now working for me since https://github.com/FRRouting/frr/commit/272c6d5db128ff7450fe9fcd16c046160594deb3

But this commit is breaking for me, "match evpn ..." https://github.com/FRRouting/frr/issues/14419

aderumier avatar Dec 02 '23 10:12 aderumier

Thanks @aderumier for the confirmation, I've just realized I made the same observations a year ago (see: https://github.com/FRRouting/frr/issues/10559#issuecomment-1282552391). Anyway I'll watch the other issue as I'm interested in it as well :)

fdomain avatar Dec 04 '23 09:12 fdomain

Closing this issue since prefix list filtering is now fixed, and evpn matchers on IP prefixes are also fixed with https://github.com/FRRouting/frr/pull/15377

fdomain avatar Feb 20 '24 13:02 fdomain