-
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
bgpd: Add support for BGP vrf route copying #13582
Conversation
Signed-off-by: Jack.Zhang <hanyu.zly@alibaba-inc.com>
This commit adds a new test case.The new test case performs three operations: install routes in vrf1. set redistribute vrf vrf1 command on vrf2. check the copying routes by vrf1 in vrf2. Signed-off-by: Jack.Zhang <hanyu.zly@alibaba-inc.com>
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: FailedCheckout code: Failed (click for details)PullReq merge failed. Please rebase your branch: |
Sorry to be obtuse ... but is there a use case for this? I'd be a bit worried about the ability to form routing loops with this change, or carry duplicate routes between vrfs (because the rd is removed)? I'm thinking this one would be good to discuss in a tuesday meeting (?) |
Imagine a case with route reflectors (RR). Router has two VRFs (VRF1/VRF2), and routes from VRF2 are modified in RR to include RT (from VRF1). And as a result, the routes will have both RTs (VRF1+VRF2) attached and routes will be imported to VRF1 again. Won't it break a normal import by RT/RD with this new Also, if VRF2 has routes with random RTs attached, will they be imported as they are with stripped RTs? |
I'd like to understand why FRR needs a third way of importing routes into different vrf's from bgp? What does FRR gain by adding another approach to the problem? |
Sorry for the delayed reply. I think I would be happy to explain the application scenario of this feature at the weekly meeting of FRR. However, I have to say that my spoken English is limited, and I may not be able to participate in the discussion fluently. Thank you for your understanding. The function of copying VRF routes is currently mainly applied in the traffic scheduling scenario of SRv6. The answers to several questions are as follows: 2.Will VRF copying cause route loops? 3.Will using RR between VRFs cause routes to be repeatedly introduced? 4.A similar implementation has been made by corresponding network equipment vendors, please refer to the following link. |
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.
One small performance question ... otherwise this looks good
looks like a git problem on ci ... rerunning |
lint just seems like spacing for comments ... probably worth fixing if just to keep them from flagging again (?) |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 5 Topotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO0U18I386/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 0 Topotests Ubuntu 18.04 arm8 part 0: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO0U18ARM8/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18ARM8-12452/test Topology Tests failed for Topotests Ubuntu 18.04 arm8 part 0 Topotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6 Topotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 6 Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO6U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 4 Topotests debian 10 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 5 Topotests debian 10 amd64 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 4 Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6 Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details)Topotests Ubuntu 18.04 amd64 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TP4U1804AMD64/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TP4U1804AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 4 Topotests Ubuntu 18.04 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 5 Topotests Ubuntu 18.04 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPOU1804-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 0 Topotests debian 10 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 0 Topotests Ubuntu 18.04 arm8 part 7: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO7U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 7: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 5 Topotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO0U18I386/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 0 Topotests Ubuntu 18.04 arm8 part 0: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO0U18ARM8/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18ARM8-12452/test Topology Tests failed for Topotests Ubuntu 18.04 arm8 part 0 Topotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6 Topotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 6 Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO6U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 4 Topotests debian 10 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 5 Topotests debian 10 amd64 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 4 Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18I386-12452/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6 Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details)Topotests Ubuntu 18.04 amd64 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TP4U1804AMD64/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TP4U1804AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 4 Topotests Ubuntu 18.04 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18AMD64-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 5 Topotests Ubuntu 18.04 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPOU1804-12452/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 0 Topotests debian 10 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0DEB10AMD64-12452/test Topology Tests failed for Topotests debian 10 amd64 part 0 Topotests Ubuntu 18.04 arm8 part 7: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 7: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12452/artifact/TOPO7U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 7: No useful log found
|
Example configuration: router bgp 100 vrf vrf-1 address-family ipv4 unicast rd vpn export 1:1 rt vpn both 1:1 export vpn import vpn redistribute vrf vrf-2 exit-address-family ! ! router bgp 100 vrf vrf-2 neighbor 2.2.2.2 remote-as 1 address-family ipv4 unicast rd vpn export 2:2 rt vpn both 2:2 neighbor 2.2.2.2 activate exit-address-family ! ! BGP routes learned from the neighbor 2.2.2.2 under VRF-1 can be directly copied to the BGP under VRF-1 without carrying the RD and RT attributes of VRF-1. After being copied to VRF-1, the routes will be sent to VPN with the RD 1:1 and RT 1:1 attributes, forming BGP-VPN routes. Signed-off-by: Jack.Zhang <hanyu.zly@alibaba-inc.com>
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18AMD64-12539/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6 Topotests debian 10 amd64 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4DEB10AMD64-12539/test Topology Tests failed for Topotests debian 10 amd64 part 4 Topotests Ubuntu 18.04 i386 part 4: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO4U18I386-12539/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 4 Topotests Ubuntu 18.04 arm8 part 0: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12539/artifact/TOPO0U18ARM8/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18ARM8-12539/test Topology Tests failed for Topotests Ubuntu 18.04 arm8 part 0 Topotests debian 10 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0DEB10AMD64-12539/test Topology Tests failed for Topotests debian 10 amd64 part 0 Topotests Ubuntu 18.04 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9U18AMD64-12539/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 9 Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18I386-12539/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6 Topotests Ubuntu 18.04 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18AMD64-12539/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 5 Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12539/artifact/TOPO6U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests Ubuntu 18.04 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPOU1804-12539/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 0 Topotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-12539/test Topology Tests failed for Topotests debian 10 amd64 part 6 Topotests Ubuntu 18.04 i386 part 0: Failed (click for details)Topotests Ubuntu 18.04 i386 part 0: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12539/artifact/TOPO0U18I386/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0U18I386-12539/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 0 Topotests Ubuntu 18.04 i386 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5U18I386-12539/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 5 Topotests Ubuntu 18.04 amd64 part 4: Failed (click for details)Topotests Ubuntu 18.04 amd64 part 4: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12539/artifact/TP4U1804AMD64/TopotestDetails/Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TP4U1804AMD64-12539/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 4 Topotests debian 10 amd64 part 5: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO5DEB10AMD64-12539/test Topology Tests failed for Topotests debian 10 amd64 part 5 Successful on other platforms/tests
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
is anyone still working on this? |
Yes, I will rebase for this branch ,fix ci test and push again. |
Example configuration:
router bgp 100 vrf vrf-1
address-family ipv4 unicast
rd vpn export 1:1
rt vpn both 1:1
export vpn
import vpn
redistribute vrf vrf-2
exit-address-family
!
!
router bgp 100 vrf vrf-2
neighbor 2.2.2.2 remote-as 1
address-family ipv4 unicast
rd vpn export 2:2
rt vpn both 2:2
neighbor 2.2.2.2 activate
exit-address-family
!
!
BGP routes learned from the neighbor 2.2.2.2 under VRF-1 can be directly copied to the BGP under VRF-1 without carrying the RD and RT attributes of VRF-1.
After being copied to VRF-1, the routes will be sent to VPN with the RD 1:1 and RT 1:1 attributes, forming BGP-VPN routes.