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 10.0.1.2 inherit peer-session IBGP
 neighbor 10.0.1.2 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.

5 comments:

  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.

    ReplyDelete
  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.

    ReplyDelete
  3. Very interesting. I wonder why Cisco took it out (security issues?).

    Thanks.

    ReplyDelete
  4. Anonymous BGP peers with neighbor templates should be brought back it scale dmvpn's

    ReplyDelete
  5. Ivan Pepelnjak05 May, 2010 02:48

    If I remember correctly, they are available in one of the 6500 images.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.