Applying a Route Map to a BGP Peer

Route maps can be applied to BGP peers, either as the inbound or outbound routing policy for neighbors under the specified address family. The following task applies a route map to an incoming route for the BGP L2VPN EVPN address family.
  1. Enter global configuration mode.
    device# configure terminal
  2. Enable BGP routing.
    device(config)# router bgp
  3. Configure the autonomous system number (ASN).
    device(config-bgp-router)# local-as 656
  4. Specify the ASN for the neighbor device.
    device(config-bgp-router)# neighbor 1.1.1.35 remote-as 656
  5. Enable BGP L2VPN EVPN address family configuration mode.
    device(config-bgp-router)# address-family l2vpn evpn
  6. Activate the neighbor to enable the exchange of information.
    device(config-bgp-l2vpn-evpn)# neighbor 1.1.1.35 activate
    
  7. Enable the sending of both standard and extended attributes in updates to the specified BGP neighbor.
    device(config-bgp-l2vpn-evpn)# neighbor 1.1.1.35 send-community both
  8. Apply a route map to an incoming route.
    device(config-bgp-l2vpn-evpn)# neighbor 10.1.1.35 route-map in myroutemap
    
    A route map named "myroutemap" is applied to an incoming route from 10.1.1.35 for the BGP L2VPN EVPN address family.

The following example applies a route map named "myroutemap" to an incoming route from 10.1.1.35 for the BGP L2VPN EVPN address family.

device# configure terminal
device(config)# router bgp
device(config-bgp-router)# local-as 656
device(config-bgp-router)# neighbor 1.1.1.35 remote-as 656
device(config-bgp-router)# address-family l2vpn evpn
device(config-bgp-l2vpn-evpn)# neighbor 1.1.1.35 activate
device(config-bgp-l2vpn-evpn)# neighbor 1.1.1.35 send-community both
device(config-bgp-l2vpn-evpn)# neighbor 10.1.1.35 route-map in myroutemap