virtual router: Add route-maps to BGP peers for Routed Mode - #9964
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9964 +/- ##
============================================
- Coverage 19.65% 19.65% -0.01%
+ Complexity 19792 19791 -1
============================================
Files 6368 6368
Lines 575107 574889 -218
Branches 70370 70353 -17
============================================
- Hits 113016 112967 -49
+ Misses 449808 449648 -160
+ Partials 12283 12274 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
thanks @wido ! |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11599 |
|
@blueorangutan test ubuntu24 kvm-ubuntu24 |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu24 mgmt + kvm-ubuntu24) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11794)
|
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11666 |
|
This one seems ready to merge, agree @weizhouapache ? If so, can we merge it? |
@wido |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18428 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16457)
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
without the change with the change |
|
@wido |
It is best practice, and mandatory in newer version of FRR, that route-maps should be applied to BGP peers. This is to prevent that mistakes can propogate through a network and cause outages. This change changes the route-maps where the VR will only accept IPv4 and IPv4 default gateways (0.0.0.0/0 and ::/0) to be sent by the upstream router to the VR. The other way around this change makes sure that FRR will not allow announcing anything else than the locally defined subnets to the upstream BGP router.
70b6cb4 to
d2f1f04
Compare
Thanks for the test! Lets re-run the test and we can push this one for later. In which env did you test it? |
@wido with the old ipv4 config with the new ipv4 config my bgp router (10.200.0.1) is also setup with frr. with the old config, this is missing with the new configuration |
|
Hi @wido @weizhouapache is this PR still in progress or is it ready for testing? |
Add tests covering the FRR configuration generated for BGP peers in Routed Mode, including the prefix-lists and route-maps which are applied to the upstream BGP peers.
…umbers The local-v4 and local-v6 prefix-lists are shared between all AS numbers, but the sequence numbers restarted at 1 for each AS number. With peers for multiple AS numbers this caused entries to overwrite each other, denying the announcement of the guest networks of all but the last AS number. Collect the guest CIDRs of all AS numbers first and number them once. Sorting the CIDRs also makes the generated configuration deterministic between runs.
I had Claude Fable take a look and it came back with a few small changes, nothing major. I also added tests. @weizhouapache In your tests, did you make sure the upstream router only sends 0.0.0.0/0 or ::/0 as routes? Anything else will be rejected by the VR. |
It is best practice, and mandatory in newer version of FRR, that route-maps should be applied to BGP peers. This is to prevent that mistakes can propogate through a network and cause outages.
This change changes the route-maps where the VR will only accept IPv4 and IPv4 default gateways (0.0.0.0/0 and ::/0) to be sent by the upstream router to the VR.
The other way around this change makes sure that FRR will not allow announcing anything else than the locally defined subnets to the upstream BGP router.