Just a short article today on BGP Peer Groups. I’ve been using them while practice labbing for the CCIP exams, thought I’d toss up a short post.

BGP Peer Groups “reduce the load on system resources by allowing the routing table to be checked only once, and updates to be replicated to all peer group members instead of being done individually for each peer in the peer group.” (-Cisco.com) They can also greatly reduce administrative overhead. They’re somewhat self-explanatory, you specify a Peer Group for two or more neighbors, then apply config to the group instead of each individual neighbor. We’re going to use my CCIP topology, but we’ll just focus on the iBGP peers:

We see that all of our PE routers are running iBGP and they’re fully meshed. Let’s look at PE1′s config without Peer Groups:

router bgp 6500
 neighbor 6.6.6.6 remote-as 6500
 neighbor 6.6.6.6 update-source Loopback0
 neighbor 6.6.6.6 next-hop-self
 neighbor 7.7.7.7 remote-as 6500
 neighbor 7.7.7.7 update-source Loopback0
 neighbor 7.7.7.7 next-hop-self
 neighbor 8.8.8.8 remote-as 6500
 neighbor 8.8.8.8 update-source Loopback0
 neighbor 8.8.8.8 next-hop-self

So for three peers we end up with ten lines of configuration, which we had to enter and the router’s processor has to sift through. As I’m sure everyone notices, the commands are identical with each peer. This is where Peer Groups come in.

Let’s see the same config with BGP Peer Groups configured:

router bgp 6500
 neighbor ibgp-peers peer-group
 neighbor ibgp-peers remote-as 6500
 neighbor ibgp-peers update-source Loopback0
 neighbor ibgp-peers next-hop-self
 neighbor 6.6.6.6 peer-group ibgp-peers
 neighbor 7.7.7.7 peer-group ibgp-peers
 neighbor 8.8.8.8 peer-group ibgp-peers

First we create the group, this is done with the “neighbor [name] peer-group” command. Then we tack our statements onto the group like we would each neighbor. Finally we attach the neighbor to the group with the “neighbor [neighbor IP] peer-group [group name]” command. We’re now down to eight lines of config, which may not sound like a ton, but imagine if you had hundreds of peers.

Now we can verify everything with a show command:

PE1#sh ip bgp peer-group ibgp-peers
BGP peer-group is ibgp-peers,  remote AS 6500
  BGP version 4
  Default minimum time between advertisement runs is 5 seconds
 
 For address family: IPv4 Unicast
  BGP neighbor is ibgp-peers, peer-group internal, members:
  6.6.6.6 7.7.7.7 8.8.8.8
  Index 0, Offset 0, Mask 0x0
  NEXT_HOP is always this router
  Update messages formatted 0, replicated 0
  Number of NLRIs in the update sent: max 0, min 0
 
 For address family: VPNv4 Unicast
  BGP neighbor is ibgp-peers, peer-group internal, members:
  6.6.6.6 7.7.7.7 8.8.8.8
  Index 0, Offset 0, Mask 0x0
  Community attribute sent to this neighbor
  Update messages formatted 0, replicated 0
  Number of NLRIs in the update sent: max 0, min 0

This tells us a bit about how the group is configured and which peers belong to it. We can also add “summary” to the command to make it more familiar looking:

PE1#sh ip bgp peer-group ibgp-peers summary
BGP router identifier 5.5.5.5, local AS number 6500
BGP table version is 80, main routing table version 80
58 network entries using 6786 bytes of memory
97 path entries using 5044 bytes of memory
10/3 BGP path/bestpath attribute entries using 1240 bytes of memory
5 BGP AS-PATH entries using 120 bytes of memory
2 BGP extended community entries using 120 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 13310 total bytes of memory
BGP activity 66/0 prefixes, 105/0 paths, scan interval 60 secs
 
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
6.6.6.6         4  6500      50      54       80    0    0 00:43:08        0
7.7.7.7         4  6500      50      54       80    0    0 00:43:04        0
8.8.8.8         4  6500      51      54       80    0    0 00:43:04       25

Short post today, but hopefully helpful.

Colby

Colby Glass has been in IT since 2002. He is currently a Systems Engineer (presales) with a Cisco Gold partner and holds the CCNP R/S, CCNP DC, CCDP, CCIP, JNCIA-ER.

More Posts