BGP Prefix Peer configuration on Nexus switches and Cisco ACI

I- What is BGP Prefix Peer

You can configure multiple BGP peers within a BGP process. You can limit BGP session establishment to a single AS number or multiple AS numbers in a route map.

  • IPv4 or IPv6 prefix peers for a single AS number: BGP establishes sessions with BGP speakers that match the prefix and the AS number.
  • Dynamic AS number prefix peers: BGP establishes sessions with BGP speakers that match the prefix and an AS number from a list of configured AS numbers.

Example of BGP Dynamic ASN prefix Peer:

If you configure BGP to use IPv4 prefix and AS numbers 33, 66, and 99, BGP establishes a session with with AS number 66 but rejects a session from with AS number 50.


The dynamic AS number prefix peer configuration overrides the individual AS number configuration that is inherited from a BGP template.

I- BGP Prefix Peer configuration on Nexus switches

Below is an example of a Dynamic ASN BGP prefix-peer:

switch# configure terminal
switch(config)# route-map BGPPeers
switch(config-route-map)# match as-number 64496, 64501-64510
switch(config-route-map)# match as-number as-path-list List1, List2
switch(config-route-map)# exit

switch(config)# router bgp 64496
switch(config-router)# neighbor remote-as route-map BGPPeers
switch(config-router-neighbor)# address-family ipv4 unicast
switch(config-router-neighbor-af)# copy running-config startup-config

II- BGP Prefix Peer configuration on Cisco ACI

  • Create L3OUT with BGP routing:

  • In The peer Address field, enter the subnet of neighbors:

  • To apply more control on the number of prefixes received from a BGP peer, we can Create a BGP peer prefix Policy:

In the BGP Peer Prefix Policy field, select an existing peer prefix policy or create a new one. The peer prefix policy defines how many prefixes can be received from a neighbor and the action to take when the number of allowed prefixes is exceeded. This feature is commonly used for external BGP peers, but can also be applied to internal BGP peers.

Bilel A

Bilel A

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Learn Duty
Would love your thoughts, please comment.x