BGP Peer Groups on Cisco IOS

This topic is to discuss the following lesson:

https://networklessons.com/bgp/bgp-peer-groups-on-cisco-ios/

Great explanation. Peer groups saves a lot of time and headache. Thanks

Ammar,
CCIE R&S - in progress

Hi Rene,

I think that in configuration there is missing a static route to each of the peer’s loopback addresses.

George

Hi George,

That’s right, this example only shows a “before” and “after” of using peer groups. You will need static routes to reach the loopback addresses of the remote peers.

Rene

how does this reduce CPU cycle by means of BGP updates ? only the configuration command got collapsed but the functionality remains the same right ?

Hi Aswin,

The functionality remains the same but behind the scenes, something is different. Imagine you have 100 BGP neighbors…they all have the same configuration. Without peer groups, the router will have to generate an update for each neighbor, one-by-one.

With peer groups, the update is generated only once for the peer group. For each neighbor, we only have to replicate the update…that’s it. That saves some CPU cycles on the router.

I have to say that most routers also support BGP Dynamic Update Peer-Groups. This means that routers will automatically try to replicate packets “behind the scenes” for each neighbor, even when you are not using peer groups. Peer groups are still useful since they simplify your configuration.

Rene

Hi,

I have a problem in R1 he doesn’t create any neighbor relationship:

These are the logs:

*Jul  9 17:58:35.187: BGP: ses global 3.3.3.3 (0x655EF9CC:0) act Reset (Active open failed).
*Jul  9 17:58:35.199: BGP: 3.3.3.3 active went from Active to Idle
*Jul  9 17:58:35.199: BGP: nbr global 3.3.3.3 Active open failed - open timer running
*Jul  9 17:58:35.203: BGP: nbr global 3.3.3.3 Active open failed - open timer running

Example for R3 but it’s the same for R2 and R4:

router bgp 1
 bgp log-neighbor-changes
 neighbor R2_R3_R4 peer-group
 neighbor R2_R3_R4 ebgp-multihop 2
 neighbor R2_R3_R4 update-source Loopback0
 neighbor 2.2.2.2 remote-as 2
 neighbor 2.2.2.2 peer-group R2_R3_R4
 neighbor 3.3.3.3 remote-as 3
 neighbor 3.3.3.3 peer-group R2_R3_R4
 neighbor 4.4.4.4 remote-as 4
 neighbor 4.4.4.4 peer-group R2_R3_R4

Hi Adiel,

These two lessons might help to understand what is going on:

BGP Neighbor Adjacency States

Troubleshooting BGP Neighbor Adjacency

Is your router able to reach 2.2.2.2, 3.3.3.3 or 4.4.4.4? Are R2, R3 and R4 able to reach 1.1.1.1? That’s something to check. Make sure the BGP configuration on R2, R3 and R4 is also using the loopback address as the source of the connection and that multihop is configured.

Rene

sir i did exactly as u did i didn’t work until i added a static route and i have to specify the neighbors manually on R1 for all it worked

 network 1.1.1.0 mask 255.255.255.0
 neighbor R2_R3_R4 peer-group
 neighbor R2_R3_R4 ebgp-multihop 2
 neighbor R2_R3_R4 update-source Loopback0
 neighbor 2.2.2.2 remote-as 2
 neighbor 2.2.2.2 peer-group R2_R3_R4
 neighbor 3.3.3.3 remote-as 3
 neighbor 3.3.3.3 peer-group R2_R3_R4
 neighbor 4.4.4.4 remote-as 4
 neighbor 4.4.4.4 peer-group R2_R3_R4
 neighbor 12.0.0.2 remote-as 2
 neighbor 13.0.0.3 remote-as 3
 neighbor 14.0.0.4 remote-as 4

so i went and i removed all of these peer group commands

 neighbor R2_R3_R4 peer-group
 neighbor R2_R3_R4 ebgp-multihop 2
 neighbor R2_R3_R4 update-source Loopback0
 neighbor 2.2.2.2 remote-as 2
 neighbor 2.2.2.2 peer-group R2_R3_R4
 neighbor 3.3.3.3 remote-as 3
 neighbor 3.3.3.3 peer-group R2_R3_R4
 neighbor 4.4.4.4 remote-as 4
 neighbor 4.4.4.4 peer-group R2_R3_R4

and still working . So my question is why do we use peer group when even if we don’t configure it it’s working as well and it didn’t save us some time

Hi Zeko,

I just added the static routes to the post, those are indeed required.

Which exact commands did you remove? Do you still have your final config?

still not working how can they become ebgp nei if R1 using his src ip add as its loopack and R2,R3 n R4 using their src ip add as their physical interfaces …

and by the way u added the static route for R 3 wd wrong next hop maybe
R3(config)#ip route 1.1.1.1 255.255.255.255 192.168.13.3 the next hope must be 192.168.13.1

Hi Zeko,

I see it now, the final configs of R2, R3, and R4 were wrong. They have to use 1.1.1.1 as the destination and source BGP from their own loopbacks. Just fixed this. Sorry for the confusion!

Rene

1 Like

A post was merged into an existing topic: Introduction to BGP

Hello Rene,
I see that the route-map SET_MED is called in the example(BGP Peer Groups Lesson) but it is not configured. I believe that configuration is missing.Also I would like to know what were we trying to achieve with that route-map

R1(config)#router bgp 1
R1(config-router)#neighbor 2.2.2.2 remote-as 2
R1(config-router)#neighbor 3.3.3.3 remote-as 3
R1(config-router)#neighbor 4.4.4.4 remote-as 4
R1(config-router)#neighbor 2.2.2.2 update-source loopback 0
R1(config-router)#neighbor 3.3.3.3 update-source loopback 0
R1(config-router)#neighbor 4.4.4.4 update-source loopback 0
R1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2
R1(config-router)#neighbor 3.3.3.3 ebgp-multihop 2
R1(config-router)#neighbor 4.4.4.4 ebgp-multihop 2
R1(config-router)#neighbor 2.2.2.2 route-map SET_MED out
R1(config-router)#neighbor 3.3.3.3 route-map SET_MED out
R1(config-router)#neighbor 4.4.4.4 route-map SET_MED out

Regards
Shriya

Hi Shriya,

You are right, I didn’t add that route-map which is a bit confusing. I just added it to the lesson.

I’m only using the route-map to show how you can apply a route-map to all neighbors with the peer group.

Rene

Static routes or IGP would suffice

That’s right, an IGP would work but since we use eBGP, it’s unlikely to use :slight_smile:

Is there any possibility to take PDF format of QoS and other items from the site (excluding video) as it would be more useful for us for preparation of exams and perusal

Hi Rene,
Nice explaination,
Just wanted to mention a small typo on the Peer groups name.
it’s not R2-R3 but R2_R3_R4

image

thierry

Thanks Thierry! Just fixed this.