Skip to content

BGP Peer Templates

I have came across a lot of BGP configurations where there are lot of the configurations can be optimized. But having said that, this is not always the case when the Network is being built gradually.

Here is a couple of them, called Peer Session Templates and Peer Policy Templates; which we can use in such BGP configuration optimisations, when we…

  1. Design a Network from scratch.
  2. Design with a future overview.

These configurations can be used when it comes to commands which are session specific.

  • description
  • disable-connected-check
  • ebgp-multihop
  • exit peer-session
  • inherit peer-session
  • local-as
  • password
  • remote-as
  • shutdown
  • timers
  • translate-update
  • update-source
  • version

I wouldn’t personally set password on a template, because…

  1. You might want to have a different password for a specific peer because it is controlled by some other Administrative body.
  2. In my opinion, it is best practice to set the password per peer than to have it under a template.

Here is an example configuration from Cisco and also take a look at the Peer Policy Templates which is used under address-family. I would strongly advise you to read through the whole document.

Peer Session Template Configuration Examples

The following example creates a peer session template named INTERNAL-BGP in session-template configuration mode:

The following example creates a peer session template named CORE1. This example inherits the configuration of the peer session template named INTERNAL-BGP.

The following example configures the neighbor to inherit the CORE1 peer session template. The neighbor will aso indirectly inherit the configuration from the peer session template named INTERNAL-BGP.

The explicit remote-as statement is required for the neighbor inherit statement to work. If a peering is not configured, the specified neighbor will not accept the session template.

comments powered by Disqus