Apply a BGP4+ Extended Community Filter

You can apply an extended community filter to a neighbor through a route map.

Procedure

  1. Access global configuration mode.
    device# configure terminal
  2. Define the matching conditions for the extended community.
    device(config)# ip extcommunity-list standard mylist permit rt 123:2
    This example specifies that community list 1 permits routes from network 2 in autonomous system 123.
  3. Access BGP configuration mode.
    device(config)# router bgp
  4. Specify the autonomous system in which your device resides.
    device(config-bgp-router)# local-as 1000
  5. Specify the autonomous system in which the remote neighbor resides.
    device(config-bgp-router)# neighbor fe80:4398:ab30:45de::1 remote-as 1001
  6. Access IPv6 address family configuration mode.
    device(config-bgp-router)# address-family ipv6 unicast
  7. Enable the exchange of information with the neighbor.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 activate
  8. Apply a route map to incoming routes.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map in extComRmapt 
    This example uses the in keyword to apply route map extComRmapt.
  9. Apply a route map to outgoing routes.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map out sendExtComRmap 
    This example uses the keyword out to apply route map sendExtComrmap.
  10. Enable the sending of standard and extended attributes in updates to the specified BGP neighbor.
    device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 send-community both
    This example uses the send-community both keywords.

Example

The following example summarizes the commands in this procedure.

device# configure terminal
device(config)# ip extcommunity-list standard mylist permit rt 123:2
device(config)# router bgp
device(config-bgp-router)# local-as 1000
device(config-bgp-router)# neighbor fe80:4398:ab30:45de::1 remote-as 1001
device(config-bgp-router)# address-family ipv6 unicast
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 activate
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map in extComRmap 
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 route-map out sendExtComRmap 
device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 send-community both