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!

BGP Routing Protocol

So what is BGP? In this series of posts I will be explaining the main principles of BGP. BGP–Border Gateway Protocol–is the de facto core routing protocol of the Internet. It operates by exchanging routes among Internet Autonomous Systems, and it is considered a path vector protocol. Routing is performed by shortest path possible and according to network policies within each Autonomous System. Most large service providers use BGP, and enterprises can operate BGP internally to influence metrics.

 

BGP operates in Layer 4 of the OSI network model and establishes TCP connections via port 179 between neighbors. BGP that is used internally is designated as iBGP and when used externally it is designated as eBGP. The implementation of routing policies are done mainly by route maps. For example, influencing traffic with BGP policies can be done with the MED (Multi-Exit Discriminator) attribute, which tells a remote AS that a specific entry into an AS is the preferred one. Therefore, BGP is great for multi-homing to different ISPs (in terms of load balancing and backup).

 

ISPs that run BGP also integrate Multiprotocol BGP (MP-BGP). It is a special extension of BGP that works with MPLS, which allows service providers to offer businesses VPN capabilities and secure connectivity across multiple branches.

This technology is very widespread in large-scale enterprises. Proactive monitoring and fault resolution of BGP is essential due to its importance and influence on the topology.

Smart BGP signatures are already embedded into indeni and many others are planned.

Here are several examples for checks indeni has around BGP configuration: