BGP - using peer-groups with multiple outbound policies
When implementing BGP, one can use BGP peer groups to simplify the configuration of a large number of BGP peers that share the same configuration. This simplifies configuration and reduces the required CPU processing power since the same update is created once and shared with multiple neighbors.
However, how do peer groups operate if we apply different outbound policies to different neighbors?
We must keep in mind that the generation of the BGP update and the manipulations and changes to that update that take place based on outbound policies applied using Route-maps and such, are two different processes.
When a BGP update is generated, it is done so based on the parameters found within the BGP configuration including prefixes and advertised routes. One update is generated for all peers in the peer group, and takes up the corresponding CPU cycles to do so. That’s the first process.
Once the update is ready, it is then sent to a neighboring peer. When this happens, any prefix lists or route maps that are applied on that peering in an outbound direction are applied to that specific BGP update and it is changed before being sent. This is the second process.
When we use peer groups, we save on CPU cycles of the first process. Instead of crafting multiple BGP updates, one for each peer, it creates only one, that is copied and sent to all peers in the peer group. The outbound policies, however, which are the second process, are still applied to each individual update in accordance with the configured route maps that apply them.
Links:
https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/54?u=lagapides