Applying a BGP extended community filter
A BGP extended community filter can be applied.
- Enter the
configure terminalcommand to access global configuration mode. - Enter the
ip community-list extendedcommand using the permit keyword to configure a BGP community ACL. - Enter the
route-mapname command to create and define a route map and enter route map configuration mode. - Enter the
match communitycommand and specify a community list name. - Enter the
set local-preferencecommand and specify a value to set a BGP local-preference path attribute. - Enter the
router bgpcommand to enable BGP routing. - Enter the
local-ascommand to configure the autonomous system number (ASN) in which your device resides. - Enter the
neighboripv6-address remote-as command to specify the ASN in which the remote neighbor resides. - Enter the
neighboripv6-address update-source command to specify an interface. - Enter the
address-familycommand and specify the ipv6 and unicast keywords to enter IPv6 address family configuration mode. - Enter the
neighboripv6-address activate command to enable the exchange of information with the neighbor. - Enter the
neighboripv6-address route-map command and specify the in keyword to apply a route map to incoming routes. - Enter the
neighboripv6-address send-community command to enable the sending of standard and extended attributes in updates to the specified BGP neighbor.
The following example applies a BGP extended community filter.
device# configure terminal device(config)# ip community-list extended 1 permit ^[1-2]23 device(config)# route-map ComRmap permit 10 device(config-route-map-ComRmap)# match community 1 device(config-route-map-ComRmap)# set local-preference 200 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)# neighbor fe80:4398:ab30:45de::1 update-source ve 1000 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 ComRmap device(config-bgp-ipv6u)# neighbor fe80:4398:ab30:45de::1 send-community