Send document comments to nexus3k-docfeedback@cisco.com
6-13
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, NX-OS Release5.0(3)U1(1)
 
Chapter 6      Configuring Advanced BGP
Configuring Advanced BGP
Use the show bgp neighbor command to see the template applied. See the Cisco Nexus 3000 Series 
Command Reference,, for details on all commands available in the template.
This example shows how to configure a BGP peer-session template and apply it to a BGP peer:
switch# configure terminal
switch(config)# router bgp 65536
switch(config-router)# template peer-session BaseSession
switch(config-router-stmp)# timers 30 90
switch(config-router-stmp)# exit
switch(config-router)# neighbor 192.168.1.2 remote-as 65536
switch(config-router-neighbor)# inherit peer-session BaseSession
switch(config-router-neighbor)# description Peer Router A
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor)# copy running-config startup-config
Configuring BGP Peer-Policy Templates
You can configure a peer-policy template to define attributes for a particular address family. You assign 
a preference to each peer-policy template and these templates are inherited in the order specified, for up 
to five peer-policy templates in a neighbor address family. 
Step 6
exit
Example:
switch(config-router-stmp)# exit
switch(config-router)#
Exits peer-session template configuration mode.
Step 7
neighbor 
ip-address 
remote-as 
as-number
Example:
switch(config-router)# neighbor 
192.168.1.2 remote-as 65536
switch(config-router-neighbor)#
Places the router in the neighbor configuration mode 
for BGP routing and configures the neighbor IP 
address.
Step 8
inherit peer-session 
template-name
Example:
switch(config-router-neighbor)# inherit 
peer-session BaseSession
switch(config-router-neighbor)
Applies a peer-session template to the peer.
Step 9
description 
text
Example:
switch(config-router-neighbor)# 
description Peer Router A
switch(config-router-neighbor)
(Optional) Adds a description for the neighbor.
Step 10
show bgp peer-session 
template-name
Example:
switch(config-router-neighbor)# show bgp 
peer-session BaseSession
(Optional) Displays the peer-policy template.
Step 11
copy running-config startup-config
Example:
switch(config-router-neighbor)# copy 
running-config startup-config
(Optional) Saves this configuration change.
Command Purpose