Specifications

Send document comments to nexus3k-docfeedback@cisco.com.
6-16
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, Release 5.0(3)U2(2)
OL-25782-02
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:
This example shows how to configure a BGP peer-policy template and apply it to a BGP peer:
switch# configure terminal
switch(config)# router bgp 65536
switch(config-router)# template peer-session BasePolicy
switch(config-router-ptmp)# maximum-prefix 20
switch(config-router-ptmp)# exit
switch(config-router)# neighbor 192.168.1.1 remote-as 65536
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor-af)# inherit peer-policy BasePolicy
switch(config-router-neighbor-af)# copy running-config startup-config
Configuring BGP Peer Templates
You can configure BGP peer templates to combine session and policy attributes in one reusable
configuration block. Peer templates can also inherit peer-session or peer-policy templates. Any attributes
configured for the neighbor take priority over any attributes inherited by that neighbor from a BGP
template. You configure only one peer template for a neighbor, but that peer template can inherit
peer-session and peer-policy templates.
Peer templates support session and address family attributes, such as eBGP multihop time-to-live,
maximum prefix, next-hop self, and timers.
Step 8
address-family ipv4 {multicast |
unicast}
Example:
switch(config-router-neighbor)#
address-family ipv4 unicast
switch(config-router-neighbor-af)#
Enters global address family configuration mode for
the IPv4 address family.
Step 9
inherit peer-policy template-name
preference
Example:
switch(config-router-neighbor-af)#
inherit peer-policy BasePolicy 1
Applies a peer-policy template to the peer address
family configuration and assigns the preference value
for this peer policy.
Step 10
show bgp peer-policy template-name
Example:
switch(config-router-neighbor-af)# show
bgp peer-policy BasePolicy
(Optional) Displays the peer-policy template.
Step 11
copy running-config startup-config
Example:
switch(config-router-neighbor-af)# copy
running-config startup-config
(Optional) Saves this configuration change.
Command Purpose