# 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:** 2

<div class="post-metadata">

**Author:** ![bahriaygordu](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/bahriaygordu/32/1061_2.png) [@bahriaygordu](https://forum.networklessons.com/u/bahriaygordu)\
**Post date:** [January 1, 2019, 2:15pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/21 "2019-01-01T14:15:16Z")

</div>

Hi

```
next-hop-self
R2(config)#ip route 1.1.1.1 255.255.255.255 192.168.12.1
R3(config)#ip route 1.1.1.1 255.255.255.255 192.168.12.1
R4(config)#ip route 1.1.1.1 255.255.255.255 192.168.12.1

```

---

<div class="post-metadata">

**Author:** ![bahriaygordu](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/bahriaygordu/32/1061_2.png) [@bahriaygordu](https://forum.networklessons.com/u/bahriaygordu)\
**Post date:** [January 1, 2019, 2:20pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/22 "2019-01-01T14:20:34Z")

</div>

we need Next-hop-self command

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [January 3, 2019, 4:55pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/23 "2019-01-03T16:55:21Z")

</div>

Hello Bahri

Yes you are correct, that in order for the routes to show up correctly in the various Autonomous Systems, it is necessary to use the `next-hop self` command. However, for this lesson, the focus was on the BGP peer group mechanism, and for this reason the `next-hop self` command was not included.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![bahriaygordu](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/bahriaygordu/32/1061_2.png) [@bahriaygordu](https://forum.networklessons.com/u/bahriaygordu)\
**Post date:** [January 3, 2019, 5:32pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/24 "2019-01-03T17:32:26Z")

</div>

thank you very much your reply

---

<div class="post-metadata">

**Author:** ![sales2161](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/sales2161/32/1432_2.png) [@sales2161](https://forum.networklessons.com/u/sales2161)\
**Post date:** [February 24, 2019, 1:56am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/25 "2019-02-24T01:56:49Z")

</div>

Hi Rene/Laz,

Do you recommend to use this particular course _(link below)_ for my CCNP studies or it goes way beyond, and therefore I should just the one mapped to CCNP Route course?

> **[BGP - NetworkLessons.com](https://networklessons.com/bgp)**
>
> BGP (Border Gateway Protocol) is the routing protocol of the Internet. In our course we'll start with the basics of BGP and then move on to advanced topics.

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [February 24, 2019, 9:58am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/26 "2019-02-24T09:58:34Z")

</div>

Hello sales2161

The courses on Networklessons are organized by either certification or topic. All the courses that are organized by topic include all of the information for that particular topic that is needed for certifications up to and including CCIE.

If you’re studying specifically for a particular certification, it’s best to use the course of that particular certification. If you just want to learn about a particular topic in depth, then go for the topical courses.

For this particular case, the BGP course goes beyond what is needed for CCNP. If you’re focusing on the CCNP certification, i would recommend using the CCNP courses (ROUTE, SWITCH, TSHOOT) on the site to focus on the required content.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ignacio.rodriguez.or](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/e36b37/32.png) [@ignacio.rodriguez.or](https://forum.networklessons.com/u/ignacio.rodriguez.or)\
**Post date:** [June 1, 2019, 6:28pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/27 "2019-06-01T18:28:18Z")

</div>

it will be possible to use a peer-group for neighbours in different vrfs?  
I have to set the same configuration for various neighbours in different vrf.

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 2, 2019, 2:57pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/28 "2019-06-02T14:57:25Z")

</div>

Hello Ignacio

Unfortunately peer groups cannot be used for neighbours on different VRFs. If you try this the router will give you an error message stating that the peer group is already being used in another VRF. Unless Cisco has changed this feature in their newer IOS versions, you limited to using one peer-group per VRF.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![ignacio.rodriguez.or](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/i/e36b37/32.png) [@ignacio.rodriguez.or](https://forum.networklessons.com/u/ignacio.rodriguez.or)\
**Post date:** [June 2, 2019, 4:19pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/29 "2019-06-02T16:19:18Z")

</div>

Thanks for your help Lazaros

---

<div class="post-metadata">

**Author:** ![alfis.iemcse](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@alfis.iemcse](https://forum.networklessons.com/u/alfis.iemcse)\
**Post date:** [June 14, 2019, 6:07pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/31 "2019-06-14T18:07:27Z")

</div>

does a bgp router need to install routes in its table to forward it to another autonomous system  
eg  
can … (\*i 10.1.1.1) from AS1 be send to AS2

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [June 18, 2019, 6:12am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/32 "2019-06-18T06:12:30Z")

</div>

Hello Alfis

In order for BGP to share its routes with other BGP routers, those routes must be in the BGP table. A router cannot advertise a route to another router unless it is installed in its own BGP table.

This lesson describes this situation quite well:

> **[How to advertise networks in BGP](https://networklessons.com/bgp/how-to-advertise-networks-in-bgp)**
>
> This lesson teaches you the different methods how you can advertises networks in BGP (Border Gateway Protocol) on Cisco IOS devices.

This lesson shows how BGP advertises networks and what the prerequisites are. Take a look at the section that begins with “What if we want to advertise a network that we don’t have?”

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![jcarlos.castillo19](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/jcarlos.castillo19/32/1858_2.png) [@jcarlos.castillo19](https://forum.networklessons.com/u/jcarlos.castillo19)\
**Post date:** [September 25, 2019, 7:56pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/33 "2019-09-25T19:56:47Z")

</div>

`show ip bgp` is displaying nothing on the bgp table , I am using GNS3 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5

could be an issue with GNS3?

```
R1#show ip bgp summ
BGP router identifier 1.1.1.1, local AS number 1
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 2 20 20 1 0 0 00:15:35 0
3.3.3.3 4 3 17 15 1 0 0 00:12:24 0
4.4.4.4 4 4 20 18 1 0 0 00:14:53 0

```

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 26, 2019, 5:33am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/34 "2019-09-26T05:33:04Z")

</div>

Hello Juan

First of all, make sure that you have issued all of the commands as described in the lesson (I’m sure you have checked this, but I still have to mention it 😛 ). Verify that BGP has been configured on both ends. You may also want to check out the following Cisco documentation that will help in troubleshooting steps.

> **[Troubleshoot Border Gateway Protocol Routes that Do Not Advertise](https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/19345-bgp-noad.html)**
>
> This document describes how to troubleshoot when a Border Gateway Protocol (BGP) router does not announce BGP routes to peers.

If you find that after all this it’s still not working, it may be an issue with GNS3, although rare, it has been known to be quirky in such issues. Try rebooting the devices or removing and reconfiguring them from scratch.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![jcarlos.castillo19](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/jcarlos.castillo19/32/1858_2.png) [@jcarlos.castillo19](https://forum.networklessons.com/u/jcarlos.castillo19)\
**Post date:** [September 26, 2019, 3:27pm UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/35 "2019-09-26T15:27:48Z")

</div>

Hi Lazaros,

Actually it forms adjacency, I just changed loopback ip address for 1.1.1.x /24 instead of 32

```
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 192.168.12.1 255.255.255.0
 speed auto
 duplex auto
!
interface FastEthernet0/1
 ip address 192.168.13.1 255.255.255.0
 speed auto
 duplex auto
!
interface FastEthernet1/0
 no ip address
 shutdown
 speed auto
 duplex auto
!
interface FastEthernet1/1
 ip address 192.168.14.1 255.255.255.0
 speed auto
 duplex 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 R2_R3_R4 route-map SET_MED out
 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
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 2.2.2.0 255.255.255.0 192.168.12.2
ip route 3.3.3.0 255.255.255.0 192.168.13.3
ip route 4.4.4.0 255.255.255.0 192.168.14.4
!
!
route-map SET_MED permit 10
 set metric 2323
!
!

```

* * *

```
R2
 interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 speed auto
 duplex auto
!
interface FastEthernet0/1
 ip address 192.168.12.2 255.255.255.0
 speed auto
 duplex auto
!
router bgp 2
 bgp log-neighbor-changes
 neighbor 1.1.1.1 remote-as 1
 neighbor 1.1.1.1 ebgp-multihop 2
 neighbor 1.1.1.1 update-source Loopback0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 1.1.1.0 255.255.255.0 192.168.12.1
!
!

```

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [October 1, 2019, 5:59am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/36 "2019-10-01T05:59:04Z")

</div>

Hello Juan

At first glance, I don’t see something wrong with the configs.

What I suggest is that you start off by first doing the initial configuration without peer groups, make sure that the routes are being shared. If not troubleshoot that part using the methods stated in the posted article. Once that’s done and it is confirmed that it is working correctly, then you can attempt to work in the peer groups, and troubleshoot once again.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![nitayp1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/n/51bf81/32.png) [@nitayp1](https://forum.networklessons.com/u/nitayp1)\
**Post date:** [October 15, 2019, 5:11am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/37 "2019-10-15T05:11:02Z")

</div>

Hi Rene,

Is there a difference between bgp template and bgp peer group when looking on the operation of the router itself?

the configuration are a little bit more complicated and organized in the template method but does the CPU utilization is the same or does the template method is even more scalable?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [October 15, 2019, 6:03am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/38 "2019-10-15T06:03:10Z")

</div>

Hello Nitay

These two entities are similar in nature, and do similar things, but the distinction between them has more to do with what the primary purpose of each is.

Peer groups were introduced to minimize the use of CPU, memory, and network resources for BGP updates. This however resulted in a second benefit, which is to simplify configuration. Most people who use peer groups will use the to simplify configuration, and this is the concept that is often expressed, but the primary purpose was to minimize the user of resources. Because the ease of configuration was never their primary purpose, there may be some restrictions and configurations that may not seem to be as optimized as they could be.

Templates on the other hand are designed specifically for streamlining configurations. Templates are more flexible, but are designed for extensively large environments, so not every network engineer will have an opportunity to see them in action. Although they do save on system resources, their primary focus is efficiency in configuration.

So although both entities will save on CPU and memory, peer groups will do a better job. However, saving on system resources is not the only issue involved in scalability. The ease of configuration is of more importance here, especially when talking about implementations with hundreds of routers or more.

So resource efficient? BGP peer group. Scalability? BGP template. But, both can be used in either case, its more a matter of what you find to be more fit for each situation.

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![nitayp1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/n/51bf81/32.png) [@nitayp1](https://forum.networklessons.com/u/nitayp1)\
**Post date:** [October 15, 2019, 6:23am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/39 "2019-10-15T06:23:11Z")

</div>

Thanks you Laz,  
Now it is much more clear to me the difference as I also read it few times online but wasn’t sure about those explanations.

---

<div class="post-metadata">

**Author:** ![ch\_umair143](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@ch\_umair143](https://forum.networklessons.com/u/ch_umair143)\
**Post date:** [October 17, 2019, 7:03am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/40 "2019-10-17T07:03:54Z")

</div>

Great Explanation Laz.

I’m new to BGP & these explanations are very easy to understand. Also can you clear one more thing, can we make peer-group with routers in same AS.?

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [October 18, 2019, 5:56am UTC](https://forum.networklessons.com/t/bgp-peer-groups-on-cisco-ios/1237/41 "2019-10-18T05:56:27Z")

</div>

Hello Umair

Glad to hear that it was helpful!

Peer groups can be used between BGP routers of the same AS (iBGP) or between BGP routers of different AS’es (eBGP).

I hope this has been helpful!

Laz

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

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