Peer Groups
Designating several BGP peers as part of the same peer group simplifies the router’s BGP configuration when the same configuration parameters and routing policies are applied to all of them. Rather than defining configuration settings and routing policies for each neighbor individually, they can be defined once for the peer group. No other routers outside of the one that defined the peer group will ever hear about it. The three stages of forming a peer group are as follows:
- Give the name of the peer group.
- Indicate which configuration settings and routing policies are shared by all peer group members.
- Name the neighbors who are in the same peer group.
Here is an example of a configuration:
R1(config)# router bgp 10
R1(config-router)# neighbor BGPCLIENTS peer-group
R1(config-router)# neighbor BGPCLIENTS ebgp-multihop 2
R1(config-router)# neighbor BGPCLIENTS update-source loopback0
R1(config-router)# neighbor BGPCLIENTS filter-list 2 in
R1(config-router)# neighbor BGPCLIENTS filter-list 1 out
R1(config-router)# neighbor 10.1.255.2 remote-as 200
R1(config-router)# neighbor 10.1.255.2 peer-group BGPCLIENTS
R1(config-router)# neighbor 10.1.255.3 remote-as 300
R1(config-router)# neighbor 10.1.255.3 peer-group BGPCLIENTS
R1(config-router)# neighbor 10.1.255.4 remote-as 400
R1(config-router)# neighbor 10.1.255.4 peer-group BGPCLIENTS
R1(config-router)# neighbor 10.1.255.5 remote-as 500
R1(config-router)# neighbor 10.1.255.5 peer-group BGPCLIENTS
R1(config-router)# exit
When there is a conflict between configuration statements, the statements that pertain to a particular neighbor take precedence over the configuration statements that pertain to a peer group that the neighbor is a member of.
The information on the router’s defined peer groups can be seen using the command show ip bgp peer-groups.
Among the many advantages of peer groups is the fact that they allow routers with many BGP neighbors to reduce the amount of configuration statements. Sharing BGP session configurations is another area where it helps. For example, updating a password or BGP timers under a peer group is far easier than updating it under each neighbor that uses the same statement.
The original intent and additional benefit of peer groups are to BGP process scaling rather than BGP setup. Each time a peer group’s outgoing policy is enforced, its members are automatically added to an update group. Then, instead of updating each individual neighbor, updates are created for the group as a whole. Imagine a router with 100 neighbors and 150,000 potential NLRI prefixes. In the case where all 100 neighbors are part of the same update group, the router only needs to scan its routing table once, resulting in 100,000 NLRI, as opposed to 15,000,000 NLRI when each neighbor is updated independently.
Dynamic Update Peer Groups is a new feature in Cisco IOS 12.0(24)S that automatically groups peers with matching outward rules to limit the amount of routing table searches, as mentioned before. All members of a conventional peer group were required to adhere to the same set of outgoing policies; hence, individuals who need somewhat different policies were required to join separate peer groups. A big BGP configuration often contained numerous small peer groups, yet they nevertheless helped to minimize the configuration size. With dynamic update peer groups, changes for peers with the same outward policies are automatically grouped without any configuration needed.
Peer Templates
Peer templates were made to make setting up BGP easier by collecting setup options that are used by more than one peer. In IOS 12.0(24)S, dynamic update peer groups and peer templates were both added at the same time to replace the older peer groups feature. Dynamic update peer groups improve and automate the performance benefits of grouped updates, and peer templates make it easier to set up groups of peers in different ways.
Having the idea of sharing is one of the best things about peer templates. In a peer group, everyone had to share the same group traits. But in a peer template, traits could be taken from another template.
Peer templates come in two different types:
- Session templates.
- Policy Templates No Attachment Found