![]() |
Table Of Contents
Related Features and Technologies
Supported Standards, MIBs, and RFCs
Configuring the BGP Named Community Lists Feature
Verifying the BGP Named Community Lists Feature
Monitoring and Maintaining BGP Named Community Lists
BGP Named Community Lists
Feature History
This feature module describes the BGP Named Community Lists feature and includes the following sections:
•
Related Features and Technologies
•
Supported Standards, MIBs, and RFCs
Feature Overview
Border Gateway Protocol (BGP) communities are attributes that are used to group and filter routes. Communities are designed to give the network operator the ability to apply policies to large numbers of routes by using match and set clauses in the configuration of route maps. Community lists are used in this process to identify and filter routes by their common attributes.
The BGP Named Community Lists feature introduces a new type of community list called the named community list. The BGP Named Community Lists feature allows the network operator to assign meaningful names to community lists and increases the number of community lists that can be configured. A named community list can be configured with regular expressions and with numbered community lists. All rules of numbered communities apply to named community lists except that there is no limitation on the number of community attributes that can be configured for a named community list.
Note
Both standard and expanded community lists have a limitation of 100 community groups that can be configured within each type of list. A named community list does not have this limitation.
Benefits
The BGP Named Community Lists feature allows the network operator to assign meaningful names to community lists. This feature also increases the number of community lists that can be configured by a network operator because there is no limitation on the number of named community list that can be configured.
Related Features and Technologies
The BGP Named Community Lists feature is an extension of the BGP routing protocol. For more information about configuring BGP, policy routing, community lists, route maps, and route filtering, refer to the "Configuring BGP" chapter of the Release 12.2 Cisco IOS IP Configuration Guide and the "BGP Commands" chapter of the Release 12.2 Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols.
Supported Platforms
The BGP Named Community List feature is supported by all platforms in Cisco IOS Release 12.2(14)S that support BGP:
•
Cisco 7200 series
•
Cisco 7400 series
•
Cisco 7500 series
Determining Platform Support Through Cisco Feature Navigator
Cisco IOS software is packaged in feature sets that support specific platforms. To get updated information regarding platform support for this feature, access Cisco Feature Navigator. Cisco Feature Navigator dynamically updates the list of supported platforms as new platform support is added for the feature.
Cisco Feature Navigator is a web-based tool that enables you to determine which Cisco IOS software images support a specific set of features and which features are supported in a specific Cisco IOS image. You can search by feature or release. Under the release section, you can compare releases side by side to display both the features unique to each software release and the features in common.
To access Cisco Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. If the check is successful, account details with a new random password will be e-mailed to you. Qualified users can establish an account on Cisco.com by following the directions at http://www.cisco.com/register.
Cisco Feature Navigator is updated regularly when major Cisco IOS software releases and technology releases occur. For the most current information, go to the Cisco Feature Navigator home page at the following URL:
Availability of Cisco IOS Software Images
Platform support for particular Cisco IOS software releases is dependent on the availability of the software images for those platforms. Software images for some platforms may be deferred, delayed, or changed without prior notice. For updated information about platform support and availability of software images for each Cisco IOS software release, refer to the online release notes or, if supported, Cisco Feature Navigator.
Supported Standards, MIBs, and RFCs
Standards
No new or modified standards are supported by this feature.
MIBs
No new or modified MIBs are supported by this feature.
To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB website on Cisco.com at the following URL:
http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml
RFCs
•
RFC 1997, BGP Communities Attribute
•
RFC 1998, An Application of the BGP Community Attribute in Multihome Routing
Configuration Tasks
See the following sections for configuration tasks for the BGP Named Community Lists feature. Each task in the list is identified as required or optional.
•
Configuring the BGP Named Community Lists Feature (required)
•
Verifying the BGP Named Community Lists Feature (optional)
A named community list can be configured as a standard or expanded community list and can use regular expressions when configured as an expanded community list.
Note
Regular expressions can be used only with expanded numbered community lists and expanded named community lists.
Configuring the BGP Named Community Lists Feature
To configure a named community list with standard community numbers, use the following commands in router configuration mode:
Verifying the BGP Named Community Lists Feature
To verify that a named community list has been configured, use the show ip bgp community-list command. The output of this command will display the community list name or number and any configured route map clauses.
The following sample output is similar to the output that will be displayed when the show ip community-list command is entered:
Router# show ip community-list
Named Community standard list COMMUNITY_LIST_NAMEpermit 1234:123 9876:321permit 5678:123 9876:321permit 1234:123 64984:1permit 5678:123 64984:1Named Community expanded list COMMUNITY_LIST_NAME_TWOpermit 1deny 2The community list name can be specified when entering the show ip community-list command. This option can be useful for filtering the output of this command and verifying a single named community list.
The following sample output is similar to the output that will be displayed when the show ip community-list command is entered and the community list name is specified:
Router# show ip community-list COMMUNITY_LIST_NAME_TWO
Named Community expanded list COMMUNITY_LIST_NAME_TWOpermit 1deny 2Monitoring and Maintaining BGP Named Community Lists
To display BGP Named Community Lists feature information, use the following EXEC commands:
Configuration Examples
The configuration examples in this section create and configure named community lists with the ip community-list global configuration command.
The following configuration example creates a named community list with the name COMMUNITY_A:
Router(config)# ip community-list standard COMMUNITY_A:The following configuration example configures a named community list with the name COMMUNITY_B that will deny routes that are part of community 10:
Router(config)# ip community-list standard COMMUNITY_B deny 10
The following configuration example configures a named community list with the name COMMUNITY_C that will permit routes that are part of community 20:
Router(config)# ip community-list standard COMMUNITY_C permit 20
The following configuration example configures a named community list with the name COMMUNITY_D that uses a regular expression to permit any routes that are part of community 100:
Router(config)# ip community-list expanded COMMUNITY_D permit 100:.*
Command Reference
This section documents modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.2 command reference publications.
ip community-list
To create a numbered or named community list for Border Gateway Protocol (BGP) and to control access to it, use the ip community-list command in global configuration command. To delete the community list, use the no form of this command.
ip community-list {standard-list-number | expanded-list-number [regular-expression] | {standard | expanded} community-list-name} {permit | deny} community-number | regular-expression
no ip community-list standard-list-number | extended-list-number | community-list-name
Syntax Description
Defaults
Once you permit a value for the community number, the community list defaults to an implicit deny for everything else that has not been permitted.
Command Modes
Global configuration
Command History
Usage Guidelines
The standard and expanded keywords are required only to configure named community lists and are not required to configure numbered community lists.
A named community list can be configured with regular expressions and with numbered community lists. All rules of numbered communities apply to named community lists except that there is no limitation on the number of community attributes that can be configured for a named community list.
Examples
The following example creates a standard community list that permits all routes except the routes with the communities 5 and 10 or 10 and 15:
Router(config)# ip community-list 1 deny 5 10Router(config)# ip community-list 1 deny 10 15Router(config)# ip community-list 1 permit internetThe following example creates a standard community list that permits all routes within the local autonomous system:
Router(config)# ip community-list 1 permit local-asThe following example creates a standard named community list with the name COMMUNITY_A that permits all routes within the local autonomous system and denies all routes with the internet community attribute:
Router(config)# ip community-list standard COMMUNITY_A permit local-ASRouter(config)# ip community-list standard COMMUNITY_A deny internetThe following example creates an expanded named community list with the name COMMUNITY_B that will not advertise routes to eBGP peers:
Router(config)# ip community-list expanded COMMUNITY_B permit no-export
The following example creates a named community list with the name COMMUNITY_C that will not advertise this route to any iBGP or eBGP peers:
Router(config)# ip community-list expanded COMMUNITY_C permit no-advertise
The following example uses a regular expression. The example creates a filter that will deny all communities that contain a number:
Router(config)# ip community-list 100 deny [0-9]*Related Commands
match community
To match a Border Gateway Protocol (BGP) community, use the match community command in route-map configuration mode. To remove the match community command from the configuration file and restore the system to its default condition where the software removes the BGP community list entry, use the no form of this command.
match community standard-list-number | expanded-list-number | community-list-name [exact]
no match community standard-list-number | expanded-list-number | community-list-name [exact]
Syntax Description
Defaults
No community list is matched by the route map.
Command Modes
Route-map configuration
Command History
Usage Guidelines
A route map can have several parts. Any route that does not match at least one match command relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route-map section with an explicit match specified.
Matching based on community list number is one of the types of match commands applicable to BGP.
Examples
The following example shows that the routes matching community list 1 will have the weight set to 100. Any route that has community 109 will have the weight set to 100.
Router(config)# ip community-list 1 permit 109
Router(config)# !
Router(config)# route-map set_weight
Router(config-route-map)# match community 1
Router(config-route-map)# set weight 100
The following example shows that the routes matching community list 1 will have the weight set to 200. Any route that has community 109 alone will have the weight set to 200.
Router(config)# ip community-list 1 permit 109
Router(config)# !
Router(config)# route-map set_weight
Router(config-route-map)# match community 1 exactRouter(config-route-map)# set weight 200
In the following example, the routes that match community list LIST_NAME will have the weight set to 100. Any route that has community 101 alone will have the weight set to 100.
Router(config)# ip community-list 1 permit 101
Router(config)# !
Router(config)# route-map set_weight
Router(config-route-map)# match community LIST_NAME
Router(config-route-map)# set weight 100
Related Commands
set comm-list delete
To remove communities from the community attribute of an inbound or outbound update, use the set comm-list delete command in route-map configuration mode. To negate a previous set comm-list delete command, use the no form of this command.
set comm-list community-list-number | community-list-name delete
no set comm-list community-list-number | community-list-name delete
Syntax Description
community-list-number
A standard or expanded community list number.
community-list-name
A standard or expanded community list name.
Defaults
No communities are removed.
Command Modes
Route-map configuration
Command History
Usage Guidelines
This set route-map configuration command removes communities from the community attribute of an inbound or outbound update using a route map to filter and determine the communities to be deleted. Depending upon whether the route map is applied to the inbound or outbound update for a neighbor, each community that passes the route map permit clause and matches the given community list will be removed from the community attribute being received from or sent to the Border Gateway Protocol (BGP) neighbor.
Each entry of a standard community list should list only one community when used with the set comm-list delete command. For example, in order to be able to delete communities 10:10 and 10:20, you must use the following format to create the entries:
ip community-list 5 permit 10:10 ip community-list 5 permit 10:20The following format for a community list entry, while acceptable otherwise, does not work with the set comm-list delete command:
config ip community-list 5 permit 10:10 10:20When both the set community community-number and set comm-list delete commands are configured in the same sequence of a route map attribute, the deletion operation (set comm-list delete) is performed before the set operation (set community community-number).
Examples
In the following example, the communities 100:10 and 100:20 (if present) will be deleted from updates received from 172.16.233.33. Also, except for 100:50, all communities beginning with 100: will be deleted from updates sent to 172.16.233.33.
router bgp 100 neighbor 172.16.233.33 remote-as 120 neighbor 172.16.233.33 route-map ROUTEMAPIN in neighbor 172.16.233.33 route-map ROUTEMAPOUT out ! ip community-list 1 permit 100:10 ip community-list 1 permit 100:20 ! ip community-list 120 deny 100:50 ip community-list 120 permit 100:.* ! route-map ROUTEMAPIN permit 10 set comm-list 1 delete ! route-map ROUTEMAPOUT permit 10 set comm-list 120 deleteRelated Commands
show ip bgp community-list
To display routes that are permitted by the Border Gateway Protocol (BGP) community list, use the show ip bgp community-list command in EXEC mode.
show ip bgp community-list standard-community-list-number | expanded-community-list-number | community-list-name [exact-match]
Syntax Description
Command Modes
EXEC
Command History
Usage Guidelines
This command requires the network operator to specify an argument when used. The exact-match keyword is optional.
Examples
The following is sample output of the show ip bgp community-list command in privileged EXEC mode:
Router# show ip bgp community-list 20BGP table version is 716977, local router ID is 192.168.32.1Status codes: s suppressed, * valid, > best, i - internalOrigin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path* i3.0.0.0 10.0.22.1 0 100 0 1800 1239 ?*>i 10.0.16.1 0 100 0 1800 1239 ?* i6.0.0.0 10.0.22.1 0 100 0 1800 690 568 ?*>i 10.0.16.1 0 100 0 1800 690 568 ?* i7.0.0.0 10.0.22.1 0 100 0 1800 701 35 ?*>i 10.0.16.1 0 100 0 1800 701 35 ?* 10.92.72.24 0 1878 704 701 35 ?* i8.0.0.0 10.0.22.1 0 100 0 1800 690 560 ?*>i 10.0.16.1 0 100 0 1800 690 560 ?* 10.92.72.24 0 1878 704 701 560 ?* i13.0.0.0 10.0.22.1 0 100 0 1800 690 200 ?*>i 10.0.16.1 0 100 0 1800 690 200 ?* 10.92.72.24 0 1878 704 701 200 ?* i15.0.0.0 10.0.22.1 0 100 0 1800 174 ?*>i 10.0.16.1 0 100 0 1800 174 ?* i16.0.0.0 10.0.22.1 0 100 0 1800 701 i*>i 10.0.16.1 0 100 0 1800 701 i* 10.92.72.24 0 1878 704 701 iTable 1 describes the significant fields shown in the display.
show ip community-list
To display configured community lists, use the show ip community-list command in EXEC mode.
show ip community-list [standard-community-list-number | extended-community-list-number | community-list-name] [exact-match]
Syntax Description
Command Modes
EXEC
Command History
Usage Guidelines
This command can be used without any arguments or keywords. If no arguments are specified, this command will display all community lists. However, the community list name or number can be specified when entering the show ip community-list command. This option can be useful for filtering the output of this command and verifying a single named or numbered community list.
Examples
The following sample output is similar to the output that will be displayed when the show ip community-list command is entered in privileged EXEC mode:
Router# show ip community-list
Community standard list 1permit 3deny 5Community (expanded) access list 101deny 4permit 6Named Community standard list COMMUNITY_LIST_NAMEpermit 1deny 7Named Community expanded list COMMUNITY_LIST_NAME_TWOdeny 2permit 8Table 2 describes the significant fields shown in the display.