# BGP Peer Groups on Cisco IOS

**URL:** https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237
**Category:** Lessons Discussion
**Created:** [December 29, 2016, 5:35pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237 "2016-12-29T17:35:12Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [December 29, 2016, 5:35pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/1 "2016-12-29T17:35:12Z")

</div>

This topic is to discuss the following lesson:

> **[BGP Peer Groups on Cisco IOS](https://networklessons.com/bgp/bgp-peer-groups-on-cisco-ios)**
>
> BGP peer groups can be used to combine the configuration of BGP neighbors using a template.

---

<div class="post-metadata">

### Author: ![ammaralmhdawi](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@ammaralmhdawi](https://forum.networklessons.com/u/ammaralmhdawi)
#### Post date: [June 27, 2015, 9:02pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/2 "2015-06-27T21:02:49Z")

</div>

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

Ammar,  
CCIE R&S - in progress

---

<div class="post-metadata">

### Author: ![georgemilev](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/g/f04885/32.png) [@georgemilev](https://forum.networklessons.com/u/georgemilev)
#### Post date: [April 16, 2016, 12:52pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/3 "2016-04-16T12:52:26Z")

</div>

Hi Rene,

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

George

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 17, 2016, 12:36pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/4 "2016-04-17T12:36:32Z")

</div>

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

---

<div class="post-metadata">

### Author: ![saswins](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@saswins](https://forum.networklessons.com/u/saswins)
#### Post date: [June 1, 2016, 4:07am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/5 "2016-06-01T04:07:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [June 1, 2016, 10:10am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/6 "2016-06-01T10:10:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![adiellevy21](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/c89c15/32.png) [@adiellevy21](https://forum.networklessons.com/u/adiellevy21)
#### Post date: [July 9, 2016, 5:12pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/7 "2016-07-09T17:12:09Z")

</div>

Hi,

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

These are the logs:

```auto
*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:

```auto
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

```

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [July 10, 2016, 11:44am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/8 "2016-07-10T11:44:16Z")

</div>

Hi Adiel,

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

[BGP Neighbor Adjacency States](https://networklessons.com/bgp/bgp-neighbor-adjacency-states/)

[Troubleshooting BGP Neighbor Adjacency](https://networklessons.com/bgp/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

---

<div class="post-metadata">

### Author: ![zz.alnajjar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/zz.alnajjar/32/1082_2.png) [@zz.alnajjar](https://forum.networklessons.com/u/zz.alnajjar)
#### Post date: [December 31, 2017, 9:44pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/9 "2017-12-31T21:44:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [January 2, 2018, 12:35pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/10 "2018-01-02T12:35:16Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![zz.alnajjar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/zz.alnajjar/32/1082_2.png) [@zz.alnajjar](https://forum.networklessons.com/u/zz.alnajjar)
#### Post date: [January 18, 2018, 12:13pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/11 "2018-01-18T12:13:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [January 24, 2018, 7:19pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/12 "2018-01-24T19:19:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [February 16, 2018, 10:52am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/13 "2018-02-16T10:52:28Z")

</div>

A post was merged into an existing topic: [Introduction to BGP](https://forum.networklessons.com/t/introduction-to-bgp/1227)

---

<div class="post-metadata">

### Author: ![shriyak529](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@shriyak529](https://forum.networklessons.com/u/shriyak529)
#### Post date: [March 24, 2018, 3:36am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/14 "2018-03-24T03:36:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 3, 2018, 10:46am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/15 "2018-04-03T10:46:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![s.shankharraaman](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/e0b2c6/32.png) [@s.shankharraaman](https://forum.networklessons.com/u/s.shankharraaman)
#### Post date: [April 5, 2018, 8:53am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/16 "2018-04-05T08:53:34Z")

</div>

> [@ReneMolenaar](#):
>
> routes to reach the loopback addresses of the remote peers

Static routes or IGP would suffice

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 5, 2018, 9:34am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/17 "2018-04-05T09:34:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![s.shankharraaman](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/e0b2c6/32.png) [@s.shankharraaman](https://forum.networklessons.com/u/s.shankharraaman)
#### Post date: [April 6, 2018, 12:23pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/18 "2018-04-06T12:23:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![diddy\_0000](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/d/ecd19e/32.png) [@diddy\_0000](https://forum.networklessons.com/u/diddy_0000)
#### Post date: [April 11, 2018, 11:04am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/19 "2018-04-11T11:04:12Z")

</div>

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](https://cdn-forum.networklessons.com/uploads/default/original/1X/e09095e96dd7f479a1b7aeaecc84f848f95c9d8d.png)

thierry

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [April 11, 2018, 11:04am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/20 "2018-04-11T11:04:39Z")

</div>

Thanks Thierry! Just fixed this.

[Next page](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237.md?page=2)
