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…
- Design a Network from scratch.
- Design with a future overview.
These configurations can be used when it comes to commands which are session specific.
- exit peer-session
- inherit peer-session
I wouldn’t personally set password on a template, because…
- You might want to have a different password for a specific peer because it is controlled by some other Administrative body.
- 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 172.16.0.1 neighbor to inherit the CORE1 peer session template. The 172.16.0.1 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.