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.

Example

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 1.1.1.1 remote-as 500
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 password cisco
 neighbor 2.2.2.2 remote-as 500
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 password cisco
 neighbor 3.3.3.3 remote-as 500
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 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 1.1.1.1 peer-group IBGP_PEER_GROUP
 neighbor 2.2.2.2 peer-group IBGP_PEER_GROUP
 neighbor 3.3.3.3 peer-group IBGP_PEER_GROUP

Caveat

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.[1] 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 Templates

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

References


  1. "BGP peer templates - PacketLife.net." http://packetlife.net/blog/2010/jan/12/bgp-peer-templates/. Accessed 21 Nov. 2017. ↩︎