ip extcommunity-list

To create an extended community list entry, use the ip extcommunity-list command. To remove the entry, use the no form of this command.

ip extcommunity-list standard list-name {deny | permit} generic {transitive | nontransitive} aa4:nn

no ip extcommunity-list standard generic {transitive | nontransitive} list-name

ip extcommunity-list expanded list-name {deny | permit} generic {transitive | nontransitive} regexp

no ip extcommunity-list expanded generic {transitive | nontransitive} list-name

Syntax Description

standard list-name

Configures a named standard extended community list.

deny

Denies access for a matching condition.

permit

Permits access for a matching condition.

generic

Specifies the generic specific extended community type.

transitive

Configures BGP to propagate the extended community attributes to other autonomous systems.

nontransitive

Configures BGP to propagate the extended community attributes to other autonomous systems.

aa4:nn

(Optional) Autonomous system number and network number. This value is configured with a 4-byte AS number and a 2-byte network number separated by a colon. The 4-byte AS number range is from 1 to 4294967295 in plaintext notation, or from 1.0 to 56636.65535 in AS.dot notation. You can enter a single community or multiple communities, each separated by a space.

expanded list-name

Configures a named expanded extended community list.

regexp

Regular expression that is used to specify a pattern to match against an input string. See the Cisco Nexus 7000 Series NX-OS Fundamentals Configuration Guide, Release 4.2 at the following URL for details on regular expressions:

http://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/fundamentals/421_n1_1/Cisco_Nexus_5000_Series_NX-OS_Fundamentals_Configuration_Guide_Release_4_2_1_N1_1_chapter4.html#con_1237003


Note Regular expressions can be used with expanded extended community lists only.



Command Default

Community exchange is not enabled by default.

Command Modes

Global configuration mode

Command History

Release
Modification

5.0(3)N1(1)

This command was introduced.


Usage Guidelines

Use the ip extcommunity-list command to configure extended community filtering for BGP. Extended community values are configured as a 6-byte number. The first four bytes represent the autonomous system number, and the last two bytes represent a user-defined network number. The BGP generic specific community attribute is defined in draft-ietf-idr-as4octet-extcomm-generic-subtype-00.txt.

BGP extended community exchange is not enabled by default. Use the send-extcommunity command in BGP neighbor fix-family configuration mode to enable extended community attribute exchange between BGP peers.

Once you configure a permit value to match a given set of extended communities, the extended community list defaults to an implicit deny for all other extended community values.

Standard Extended Community Lists

Use standard extended community lists to configure specific extended community numbers. You can configure a maximum of 16 extended communities in a standard extended community list.

Expanded Extended Community Lists

Use expanded extended community lists to filter communities using a regular expression. Use regular expressions to configure patterns to match community attributes. The order for matching using the * or + character is the longest construct is first. Nested constructs are matched from the outside in. Concatenated constructs are matched beginning at the left side. If a regular expression can match two different parts of an input string, it matches the earliest part first.

Community List Processing

When you configure multiple values in the same extended community list statement, a logical AND condition is created. All extended community values must match to satisfy the AND condition. When you configure multiple values in separate community list statements, a logical OR condition is created. The first list that matches a condition is processed.

Examples

This example shows how to configure a standard generic specific extended community list that permits routes from network 40 in autonomous system 1.65534 and from network 60 in autonomous system 1.65412:

switch(config)# ip extcommunity-list standard test1 permit generic transitive 1.65534:40 1.65412:60 
switch(config)#

All community values must match in order for the list to be processed.

Related Commands

Command
Description

feature bgp

Enables BGP.

match extcommunity

Matches an extended community in a route map.

send-community

Configures BGP to propagate community attributes to BGP peers.

set extcommunity

Sets an extended community in a route map.