Send document comments to nexus3k-docfeedback@cisco.com
6-18
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, NX-OS Release 5.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 template and apply it to a BGP peer:
switch# configure terminal
switch(config)# router bgp 65536
switch(config-router)# template peer BasePeer
switch(config-router-neighbor)# inherit peer-session BaseSession
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor-af)# inherit peer-policy BasePolicy 1
switch(config-router-neighbor-af)# exit
switch(config-router-neighbor)# exit
switch(config-router)# neighbor 192.168.1.2 remote-as 65536
switch(config-router-neighbor)# inherit peer BasePeer
switch(config-router-neighbor)# copy running-config startup-config
Configuring Prefix Peering
BGP supports the definition of a set of peers using a prefix for both IPv4. This feature allows you to not
have to add each neighbor to the configuration.
When defining a prefix peering, you must specify the remote AS number with the prefix. BGP accepts
any peer that connects from that prefix and autonomous system if the prefix peering does not exceed the
configured maximum peers allowed.
When a BGP peer that is part of a prefix peering disconnects, Cisco NX-OS holds its peer structures for
a defined prefix peer timeout value. An established peer can reset and reconnect without danger of being
blocked because other peers have consumed all slots for that prefix peering.
Step 10
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 neighbor configuration mode for
BGP routing and configures the neighbor IP address.
Step 11
inherit peer
template-name
Example:
switch(config-router-neighbor)# inherit
peer BasePeer
Inherits the peer template.
Step 12
timers
keepalive hold
Example:
switch(config-router-neighbor)# timers
60 120
(Optional) Adds the BGP timer values to this neighbor.
These values override the timer values in the peer
template and the peer-session template.
Step 13
show bgp peer-template
template-name
Example:
switch(config-router-neighbor-af)# show
bgp peer-template BasePeer
(Optional) Displays the peer template.
Step 14
copy running-config startup-config
Example:
switch(config-router-neighbor-af)# copy
running-config startup-config
(Optional) Saves this configuration change.
Command Purpose