Saturday, 13 March 2021

BGP Chapter 21 - BGP Peer Group

 Sometimes it happens that while configuring bgp neighbors some of the configuration for
neighbors is exactly same and configuring the same can irritate you !

So to avoid the same you can use "BGP Peer Group".

For sure it will save time and also CPU resources of the router since whenever BGP sends update
it will send the update for peer group rather than separately for each neighbor.

 

BGP Peer Group

 Basic Configuration

=======================

 R1
===============
config t
hostname R1
interface eth1/0
ip add 12.1.1.1 255.255.255.0
no shut
exit
interface eth1/1
ip add 13.1.1.1 255.255.255.0
no shut
exit
int loopback 0
ip address 1.1.1.1 255.255.255.255
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
exit

R2
===============
config t
hostname R2
interface eth1/0
ip add 12.1.1.2 255.255.255.0
no shut
exit
int loopback 0
ip address 2.2.2.2 255.255.255.255
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
exit

R3
===============
config t
hostname R3
interface eth1/1
ip add 13.1.1.3 255.255.255.0
no shut
exit
int loopback 0
ip address 3.3.3.3 255.255.255.255
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
exit
==============================================
BGP Configuration on R2
==========================
config t
router bgp 100
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 password cisco123
exit

BGP Configuration on R3
==========================
config t
router bgp 100
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source loopback 0
neighbor 1.1.1.1 password cisco123
exit

Without Peer Group
=========================
BGP Configuration on R1

config t
router bgp 100
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source loopback 0
neighbor 2.2.2.2 password cisco123
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source loopback 0
neighbor 3.3.3.3 password cisco123
exit


With Peer Group

=========================
BGP Configuration on R1

config t
router bgp 100
neighbor amar peer-group
neighbor amar remote-as 100
neighbor amar update-source loopback 0
neighbor amar password cisco123
neighbor 2.2.2.2 peer-group amar
neighbor 3.3.3.3 peer-group amar
exit
exit

R1#sh run | section bgp
router bgp 100
 bgp log-neighbor-changes
 neighbor amar peer-group
 neighbor amar remote-as 100
 neighbor amar password cisco123
 neighbor amar update-source Loopback0
 neighbor 2.2.2.2 peer-group amar
 neighbor 3.3.3.3 peer-group amar
R1#
R1#
R1#sh ip bgp summ
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4          100       6       6        1    0    0 00:02:05        0
3.3.3.3         4          100       6       4        1    0    0 00:02:04        0
R1#

R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4          100      13      13        1    0    0 00:08:33        0
R2#

R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4          100      10      13        1    0    0 00:08:09        0
R3#

Thanks for reading !!!!

 amartechstuff

 



No comments:

Post a Comment