BGP - Handling Multiple Communities on a Single Route

In BGP, when multiple well-known communities are applied to a single route, all communities apply their effects simultaneously. The BGP protocol does not prioritize one community over another. Instead, it applies all the community values to the route.

When you have seemingly contradictory communities, then the rule is that the most restrictive one is applied. For example, consider the following three well-known communities:

  • NO_EXPORT: This community instructs the router not to advertise this route to eBGP peers.
  • NO_ADVERTISE: This community instructs the router not to advertise this route to any peer, neither iBGP nor eBGP.
  • NO_EXPORT_SUBCONFED: This community instructs the router not to advertise this route to eBGP peers or any peers outside the local confederation.

If you apply all these three communities to a route, the NO_ADVERTISE will take effect, which is the most restrictive one. This means the route will not be advertised to any peers, whether iBGP, eBGP, or confederation peers.

https://forum.networklessons.com/t/bgp-community-no-advertise/1240/33?u=lagapidis

https://networklessons.com/bgp/bgp-community-no-advertise