BGP peer groups have existed in Cisco’s iOS for a long time and they are a very handy feature in large BGP setups.
The real advantage of using BGP peer groups lies in the reduction of resource usage by routers when they are making updates to BGP neighbors. The routing table is checked once and updates are distributed to all the neighbors in a particular peer group, as opposed to distributing updates to one neighbor at a time.
BGP peer groups also reduce the amount of configuration that needs to be done on the router and centralize BGP administration.
Let’s look at following setup:
R1 is in AS100 and all the routers are in AS 200.
We need to set up BGP so that it will be easy to administer and also scalable (so that adding another BGP neighbor is also easy to do).
We can use the standard approach:
router bgp 100 neighbor 188.8.131.52 remote-as 200 neighbor 184.108.40.206 timers 30 300 neighbor 220.127.116.11 password indeni
router bgp 100 neighbor 18.104.22.168 remote-as 200 neighbor 22.214.171.124 timers 30 300 neighbor 126.96.36.199 password indeni
router bgp 100 neighbor 188.8.131.52 remote-as 200 neighbor 184.108.40.206 timers 30 300 neighbor 220.127.116.11 password indeni
Pretty simple, isn’t it…?
But what happens when you have 60 of these and you need to add or remove neighbors quickly or apply policy? There’s a lot of room for mistakes.
However, by using a peer group with the name MyGroup, we define it just once, and manage our neighbors with greater ease.
This is how you configure a BGP peer group:
router bgp 100 neighbor MyGroup peer-group neighbor MyGroup remote-as 200 neighbor MyGroup timers 30 300 neighbor MyGroup password indeni neighbor 18.104.22.168 peer-group MyGroup neighbor 22.214.171.124 peer-group MyGroup neighbor 126.96.36.199 peer-group MyGroup
In order to verify your configuration, use the following command:
show ip bgp peer-group peer-group name
In the following screenshot we can see that all of the BGP neighbors are attached to a peer group.
That’s it. Happy BGP configuration!