BGP peer group is a set of BGP neighbors that shares the same outbound policy, whereas the inbound policy might be different.

 When BGP is configured on routers, it processes updates on a neighbor-by-neighbor basis. This requires CPU resources to be pulled  from the router  for each neighbor update that is processed. However, when we have 2 or more neighbors with similar parameters (for example a similar or same set of filtering settings like; route-maps, prefix-list, distribute list),  BGP can group those neighbor into a “BGP peer group.”  For example let’s say that we have two routes from different ISP set up into an enterprise router and we are applying the same set of rule for both routes. In this scenario we can use BGP peer groups. This is important because if we are dealing with a large scale network, grouping neighbors into a  common peer group with reduce CPU dramatically.

 An example might help:

In this example, we want to block private  subnets (loopbacks (1.1.1.1/32, 2.2.2.2/32, 3.3.3.3/32) from being advertised to both ISPs. Since our goal is to use the same “Filtering technique for both neighbors,” we can group them into a common “BGP peer group,” so the Enterprise router can apply the filer for both ISPs once per update.

Below I will show the commands on each router and the results:

Router (Enterprise E1)

Enterprise_E1#sh run | section bgp

router bgp 65501

 no synchronization

 bgp log-neighbor-changes

 network 1.1.1.1 mask 255.255.255.255

 network 2.2.2.2 mask 255.255.255.255

 network 3.3.3.3 mask 255.255.255.255

 network 25.10.10.0 mask 255.255.255.252

 network 25.10.10.4 mask 255.255.255.252

 network 172.16.1.0 mask 255.255.255.0

 neighbor PG_example peer-group

 neighbor PG_example prefix-list block-lan out

 neighbor 25.10.10.2 remote-as 62201

 neighbor 25.10.10.2 peer-group PG_example

 neighbor 25.10.10.6 remote-as 64101

 neighbor 25.10.10.6 peer-group PG_example

 no auto-summary

Enterprise_E1#sh ip pre

Enterprise_E1#sh ip prefix-list

ip prefix-list block-lan: 4 entries

   seq 5 deny 1.1.1.1/32

   seq 10 deny 2.2.2.2/32

   seq 15 deny 3.3.3.3/32

   seq 20 permit 172.16.1.0/24

Router (ISP_1) :

ISP_1#sh run | section bgp

router bgp 62201

 no synchronization

 bgp log-neighbor-changes

 neighbor 25.10.10.1 remote-as 65501

ISP_1#sh ip route

(REDACTED)

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets

B       172.16.1.0 [20/0] via 25.10.10.1, 00:11:19

     25.0.0.0/30 is subnetted, 1 subnets

C       25.10.10.0 is directly connected, FastEthernet1/0

Router(ISP_2)

ISP_2#show run | section bgp

router bgp 64101

 no synchronization

 bgp log-neighbor-changes

 neighbor 25.10.10.5 remote-as 65501

 no auto-summary

ISP_2#sh ip route

(REDACTED)

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets

B       172.16.1.0 [20/0] via 25.10.10.5, 00:12:19

     25.0.0.0/30 is subnetted, 1 subnets

C       25.10.10.4 is directly connected, FastEthernet1/1

Basically I have applied a prefix list into the “BGP peer group”  to deny the Private subnets from Router Enterprise from being advertise to the ISPs, but the focus on this article is to take a look at how I group the neighbors for both ISP to a common “BGP peer group,” so the Enterprise router E1 can process an update for both neighbors once.

Hope it helps! If you have questions, comments, or want to add something value or even to correct something, please do not hesitate to mention below.

Thank you,

Jesus Contreras.

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami