BGP Peer Group Configuration

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).

BGP Peer Group configuration example BGP Peer Group configuration example

We can use the standard approach:

router bgp 100 neighbor 1.1.1.1 remote-as 200 neighbor 1.1.1.1 timers 30 300 neighbor 1.1.1.1 password indeni

router bgp 100 neighbor 2.2.2.2 remote-as 200 neighbor 2.2.2.2 timers 30 300 neighbor 2.2.2.2 password indeni

router bgp 100 neighbor 3.3.3.3 remote-as 200 neighbor 3.3.3.3 timers 30 300 neighbor 3.3.3.3 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 1.1.1.1 peer-group MyGroup neighbor 2.2.2.2 peer-group MyGroup neighbor 3.3.3.3 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.

BGP neighbors attached to a peer group BGP neighbors attached to a peer group

That’s it. Happy BGP configuration!

Leave a Reply