Skip to content

Do not re-advertise BGP routes#1351

Merged
Fredi-raspall merged 2 commits intomainfrom
pr/fredi/no-bg-readvertise
Mar 17, 2026
Merged

Do not re-advertise BGP routes#1351
Fredi-raspall merged 2 commits intomainfrom
pr/fredi/no-bg-readvertise

Conversation

@Fredi-raspall
Copy link
Contributor

Don't let gateway re-advertise routes
Fixes: #1266

@Fredi-raspall Fredi-raspall requested a review from a team as a code owner March 17, 2026 14:05
@Fredi-raspall Fredi-raspall changed the title Pr/fredi/no bg readvertise Pr/fredi/no bgp readvertise Mar 17, 2026
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/no-bg-readvertise branch 2 times, most recently from c7b00ce to 900e59c Compare March 17, 2026 14:28
}

const EVPN_RMAP_IN: &str = "EVPN-ROUTE-MAP-IN";
fn route_map_evpn_in() -> RouteMap {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will widely use RouteMap filtering later. From the code there is no particular sign of what kind of RouteMap we are creating despite of NoAdvertise use in this function. Maybe we can either rename this particular function into route_map_evpn_in_no_adv() or have a constructor function that receives set of RouteMapEntries and applies it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/no-bg-readvertise branch from 900e59c to 5c47698 Compare March 17, 2026 15:56
Copy link
Contributor

@sergeymatov sergeymatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Fredi-raspall !

@Fredi-raspall Fredi-raspall added the ci:+vlab Enable VLAB tests label Mar 17, 2026
Define a new type to extend the configuration of a bgp neighbor
on a per addrss family basis, and extend renderer to configure it.

Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Configure bgp so that no routes get re-advertised. This prevents
the gateway from advertising any route it learns from other peers.
A gateway should not re-advertise the routes it learns but only
those it originates, in the current design.This prevents it from
announcing evpn routes that it learns (like type 2) which it should
not advertise.

This behavior is achieved by marking all of the evpn routes learnt
with community "no-advertise".

Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/no-bg-readvertise branch from 5c47698 to 2d90fbb Compare March 17, 2026 16:26
@qmonnet qmonnet changed the title Pr/fredi/no bgp readvertise Do not re-advertise BGP routes Mar 17, 2026
@Fredi-raspall Fredi-raspall added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit f7de041 Mar 17, 2026
21 checks passed
@Fredi-raspall Fredi-raspall deleted the pr/fredi/no-bg-readvertise branch March 17, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:+vlab Enable VLAB tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent gateway from re-advertising routes.

2 participants