Configuring BGP dynamic neighbors for an IP Fabric

  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the router bgp command to enable BGP routing.
    device(config)# router bgp
  3. Enter the local-as command to configure the autonomous system number (ASN) in which your device resides.
    device(config-bgp-router)# local-as 65520
  4. Enter the neighbor peer-group command, specifying a name for the peer group, to create a peer group.
    device(config-bgp-router)# neighbor leaf-group peer-group
  5. Enter the listen-limit command and specify a value to define the maximum number of BGP dynamic subnet range neighbors that can be created.
    device(config-bgp-router)# listen-limit 30
  6. Enter the neighbor peer-group remote-as command to specify an AS for the peer group.
    device(config-bgp-router)# neighbor leaf-group remote-as 65550
  7. Enter the listen-range command, specifying an IP address and mask, to associate a subnet range with the BGP peer group. Use the limit parameter and specify a value to set the maximum number of BGP dynamic neighbors that can be created.
    device(config-bgp-router)# listen-range 150.1.0.0/16 peer-group leaf-group limit 20 
  8. Enter the neighbor alternate-as command with the add parameter, specifying a value, to set an alternate AS number for listen range neighbors in the configured peer group.
    device(config-bgp-router)# neighbor leaf-group alternate-as add 1210
  9. Enter the address-family l2vpn evpn command to enter L2VPN EVPN address family configuration mode.
    device(config-bgp-router)# address-family l2vpn evpn
    
    
  10. Enter the neighbor peer-group activate command to enable the exchange of information with the peer group.
    device(config-bgp-evpn)# neighbor leaf-group activate
    
    

The following example creates a peer group called "leaf-group" and associates it with the listen range of 150.1.0.0/16. It also sets a limit on the number of dynamic BGP neighbors that can be created. An alternate AS number of listen range neighbors in the configured peer group is set.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 65520
device(config-bgp-router)# neighbor leaf-group peer-group
device(config-bgp-router)# listen-limit 30
device(config-bgp-router)# neighbor leaf-group remote-as 65550
device(config-bgp-router)# listen-range 150.1.0.0/16 peer-group leaf-group limit 20
device(config-bgp-router)# neighbor leaf-group alternate-as add 1210
device(config-bgp-router)# address-family l2vpn evpn
device(config-bgp-evpn)# neighbor leaf-group activate