BGP Peer Groups & Peer Templates
BGP — By CCIETalk on July 22, 2008 at 4:56 pm
BGP Peer-Groups are used to optimize BGP Networks. If you have a number of BGP peers, Peer-Groups can simplify configuration and updates can be more efficient. Key is that all those peers share the same update policies such as outbound route-maps, distribute-lists etc.
Some of the benefits of BGP Peer-groups:
- Peer-groups provide optimization of BGP convergence. For example, if a BGP speaker has 10 IBGP peers that exchange full BGP routing (100,000 prefixes), without the use of peer-groups, local router will go through 1 million prefixes. Now if you configure peer-groups, the router has to go through only 100,000 prefixes.
- It provides a mechanism for peers that have an identical outbound policy.
- It can reduce the administrative overhead by cutting down redundant configuration.
Example of Peer-group:
router bgp 100
no synchronization
bgp log-neighbor-changes
network 192.168.1.0
neighbor TST peer-group
neighbor TST remote-as 100
neighbor TST password cisco
neighbor TST update-source Loopback0
neighbor TST version 4
neighbor 2.2.2.2 peer-group TST
neighbor 3.3.3.3 peer-group TST
neighbor 4.4.4.4 peer-group TST
As you can see, we defined a peer-group "TST" and then set the parameters for "TST" such as remote-as, version etc. Finally we can use the neighbor statement to apply peer-group TST to all the peers.
To reveal the members of a peer-group use:
R1#sh ip bgp peer-group
BGP peer-group is TST, remote AS 100
BGP version 4
Default minimum time between advertisement runs is 0 secondsFor address family: IPv4 Unicast
BGP neighbor is TST, peer-group internal, members:
2.2.2.2 3.3.3.3 4.4.4.4
Index 0, Offset 0, Mask 0x0
Update messages formatted 0, replicated 0
Number of NLRIs in the update sent: max 0, min 0
You can disable a BGP peer or peer group without removing all the configuration information using the neighbor shutdown router configuration command.
BGP Peer Templates
Even though peer-groups worked great, they had a few shortcomings especially when it came to configuration management. Peer templates can be applied to neighbors that share policies and are also reusable via inheritance feature. We can inherit peer templates within another peer template aka nested structure.
There are two types of peer templates:
- Peer session templates that are used to group and apply configuration of general session commands that are common to all address families and config modes
- Peer policy templates are used to group and apply configuration commands that are applied within specific address families and configuration modes.
Summary Steps to configure Peer Session Template:
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
template peer-session session-template-name
5.
remote-as autonomous-system-number
6.
timers keepalive-interval hold-time
7.
end
8.
show ip bgp template peer-session [session-template-name]
Configuring Peer Session Template Inheritance with the inherit peer-session Command
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
template peer-session session-template-name
5.
description text-string
6.
update-source interface-type interface-number
7.
inherit peer-session session-template-name
8.
end
9.
show ip bgp template peer-session [session-template-name]
Configuring Peer Session Template Inheritance with the neighbor inherit peer-session Command
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
neighbor ip-address remote-as autonomous-system-number
5.
neighbor ip-address inherit peer-session session-template-name
6.
end
7.
show ip bgp template peer-session [session-template-name]
Commands supported by Peer-Session Templates:
- description
- disable-connected-check
- ebgp-multihop
- exit peer-session
- inherit peer-session
- local-as
- password
- remote-as
- shutdown
- timers
- translate-update
- update-source
- version
Summary Steps to configure Peer-Policy Templates:
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
template peer-policy policy-template-name
5.
maximum-prefix prefix-limit [threshold] [restart restart-interval | warning-only]
6.
weight weight-value
7.
prefix-list prefix-list-name {in | out}
8.
exit-peer-policy
Configuring Peer Policy Template Inheritance with the inherit peer-policy Command
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
template peer-policy policy-template-name
5.
route-map map-name {in | out}
6.
inherit peer-policy policy-template-name sequence-number
7.
end
8.
show ip bgp template peer-policy [policy-template-name [detail]]
Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command
1.
enable
2.
configure terminal
3.
router bgp autonomous-system-number
4.
neighbor ip-address remote-as autonomous-system-number
5.
address-family ipv4 [multicast | unicast | vrf vrf-name]
6.
neighbor ip-address inherit peer-policy policy-template-name
7.
end
8.
show ip bgp neighbors [ip-address [policy [detail]]]
Commands supported by Peer-Policy Templates:
- advertisement-interval
- allowas-in
- as-override
- capability
- default-originate
- distribute-list
- dmzlink-bw
- exit-peer-policy
- filter-list
- inherit peer-policy
- maximum-prefix
- next-hop-self
- next-hop-unchanged
- prefix-list
- remove-private-as
- route-map
- route-reflector-client
- send-community
- send-label
- soft-reconfiguration
- unsuppress-map
- weight
So this was a brief overview of BGP Peer-groups and Peer templates that I ran through. I read through the UniverCD and extracted some brief points for you. I highly recommend going to the documentation and reading this to better understand the concept. I will move on to the next topic in BGP. Feel free to contact me if you have any questions!
Tags: bgp peer-groups, session templates
Tweet This
Digg This
Save to delicious
Stumble it








1 Comment