Building network automation solutions

9 module online course

Start now!

BGP Essentials: Peer Session Templates

Configuring a large number of similar BGP peers on a router and ensuring that the changes in your routing policy or BGP design are applied to all of them can be a management nightmare. BGP peer groups were the only scalability tool available on Cisco IOS until the IOS release 12.3T and they had significant limitations as they were also used as a performance improvement tool.

IOS releases 12.0S and 12.3T introduced peer templates, a scalable hierarchical way of configuring BGP session parameters and inbound/outbound policies. For example, to configure the session parameters for all your IBGP sessions, use the following session template:
router bgp 65001
 template peer-session IBGP
  remote-as 65001
  description IBGP peers
  password s3cr3t
  update-source Loopback0

After the session template has been configured, adding a new IBGP peer takes just a single configuration command (two if you want to add neighbor description):

router bgp 65001
 neighbor inherit peer-session IBGP
 neighbor description R2

If you're looking for more in-depth BGP knowledge, try our Configuring BGP on Cisco Routers e-learning solution. If you just need to enhance your hands-on skill, the BGP Remote Lab Bundle is the perfect choice.


  1. I wonder if Cisco would interest in creating something called promiscuous-mode EBGP? This would be similar to DLSw+ promoscuous mode. For example, if I can configure a headend router to terminate hundreds of incoming EBGP/IBGP peers w/o having to manually define each neighbor statement it would save a lot of config nightmare at the headend. You might ask why do we need it? For example, for DMVPN hub-and-spoke, the scalability improves if one uses BGP instead of EIGRP or OSPF. Although the true throughput may be limited by PPS, but it's the scalability of the terminations using BGP that is worth a look.
  2. Anonymous BGP peers with neighbor templates were implemented at least in Cisco Software release 9.21 (they might have been in 9.1 release, but 9.1 documentation is missing from CCO). Sadly, this feature was later removed from IOS.
  3. Very interesting. I wonder why Cisco took it out (security issues?).

  4. Anonymous BGP peers with neighbor templates should be brought back it scale dmvpn's
  5. If I remember correctly, they are available in one of the 6500 images.
Add comment