What is a BGP Peer Group?
BGP peer groups are used to simplify configuration and to improve performance. This is achieved by assigning the same outbound policy to each of the neighbours. Because UPDATEs are generated only once per peer group rather multiple times for each neighbouring router, peer groups save processing time when building neighbour updates.
Let's look at an example:
Our example is based upon a configuration that contains a number of iBGP peers, like so:
router bgp 500 neighbor 220.127.116.11 remote-as 500 neighbor 18.104.22.168 update-source Loopback0 neighbor 22.214.171.124 password cisco neighbor 126.96.36.199 remote-as 500 neighbor 188.8.131.52 update-source Loopback0 neighbor 184.108.40.206 password cisco neighbor 220.127.116.11 remote-as 500 neighbor 18.104.22.168 update-source Loopback0 neighbor 22.214.171.124 password cisco
With this configuration, we can create a peer group containing the common configuration elements. This peer group is then applied to our neighbours. As shown below:
router bgp 500 neighbor IBGP_PEER_GROUP remote-as 500 neighbor IBGP_PEER_GROUP update-source Loopback0 neighbor IBGP_PEER_GROUP password cisco neighbor 126.96.36.199 peer-group IBGP_PEER_GROUP neighbor 188.8.131.52 peer-group IBGP_PEER_GROUP neighbor 184.108.40.206 peer-group IBGP_PEER_GROUP
One key point to remember with peer groups is that peer types cannot be mixed. i.e you cannot use a peer group across iBGP and eBGP peers. Instead, two separate peer groups would be required.
Dynamic Update Peer Groups
Introduced within IOS 12.0(24)S, we must mention dynamic update peer groups. Dynamic update peer groups automatically group BGP neighbours into peer groups and generate update messages accordingly. Even though this feature makes the use of manually creating peer groups for the goal of CPU optimization obsolete, their ability to simplify the configuration still makes it a somewhat useful feature.
Peer groups, however, are not the only feature for simplifying BGP configuration. Peer templates also provide a method for building BGP configuration based upon templates. In addition, they also provide the ability for inheritance and in turn template overriding.
Though, outside the scope of this article, for more information please see : https://rodvand.github.io/knowledge/2017/01/16/peer-templates-bgp.html
"BGP peer templates - PacketLife.net." http://packetlife.net/blog/2010/jan/12/bgp-peer-templates/. Accessed 21 Nov. 2017. ↩︎