Using Peer Groups
Problem
You want to apply the same options to several peers.
Solution
Peer groups allow you to apply the same BGP configuration to a number of neighbors at the same time:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#router bgp
Router1(config-router)#
65500
neighbor
EBGP-PEERS
peer-group
Router1(config-router)#neighbor
EBGP-PEERS
prefix-list
PRE-RTFILTER
in
Router1(config-router)#neighbor
EBGP-PEERS
filter-list
15
out
Router1(config-router)#neighbor
192.168.1.5
remote-as
Router1(config-router)#
65520
neighbor
192.168.1.5
peer-group
Router1(config-router)#
EBGP-PEERS
neighbor
192.168.1.9
remote-as
Router1(config-router)#
65521
neighbor
192.168.1.9
peer-group
Router1(config-router)#
EBGP-PEERS
neighbor
192.168.1.13
remote-as
Router1(config-router)#
65522
neighbor
192.168.1.13
peer-group
Router1(config-router)#
EBGP-PEERS
neighbor
192.168.1.17
remote-as
Router1(config-router)#
65523
neighbor
192.168.1.17
peer-group
Router1(config-router)#
EBGP-PEERS
exit
Router1(config)#end
Router1#
Discussion
Peer groups have been around since IOS Version 11.0, but they had several unfortunate restrictions that were eliminated in Version 12.0. The most important of these were that all eBGP members of the same peer group had to be members of the same IP subnet, and you couldn’t act as a transit router to eBGP neighbors that were members of the same peer group. These restrictions have been removed now, but you will still sometimes see these ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.