The commands in Step 5 and 6 are optional and could be replaced with any supported general session commands. Note Note The following restrictions apply to the peer session templates: • A peer session template can directly inherit only one session template, and each inherited session template can also contain one indirectly inherited session template. So, a neighbor or neighbor group can be configured with only one directly applied peer session template and seven additional indirectly inherited peer session templates. • A BGP neighbor cannot be configured to work with both peer groups and peer templates.
A BGP neighbor can be configured to belong only to a peer group or to inherit policies only from peer templates. To configure a basic peer session template, perform this procedure: Procedure Configuring BGP Configuring a Basic Peer Session Template Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Device# configure terminal Enters global configuration mode. Step 3 router bgp autonomous-system-number Example: Device(config)# router bgp 101 Enters router configuration mode and creates a BGP routing process. Step 4 template peer-session session-template-name Example:
Device(config-router)# template peer-session INTERNAL-BGP Enters session-template configuration mode and creates a peer session template. Step 5 remote-as autonomous-system-number Example: Device(config-router-stmp)# remote-as 202 (Optional) Configures peering with a remote neighbor in the specified autonomous system. Note Configuring BGP 40