The if-match extcommunity-filter command sets a matching rule that is based on the extended community filter.
The undo if-match extcommunity-filter command cancels the configuration.
By default, no matching rule based on the extended community filter is set.
if-match extcommunity-filter { { basic-extcomm-filter-num | adv-extcomm-filter-num } &<1-16> | extcomm-filter-name }
undo if-match extcommunity-filter [ [ basic-extcomm-filter-num | adv-extcomm-filter-num ] &<1-16> | extcomm-filter-name ]
| Parameter | Description | Value |
|---|---|---|
| basic-extcomm-filter-num | Specifies the number of the basic extended community filter. | It is an integer that ranges from 1 to 199. |
| advanced-extcomm-filter-num | Specifies the number of the advanced extended community filter. | It is an integer that ranges from 200 to 399. |
| extcomm-filter-name | Specifies the name of the extended community filter. | The name is a string of 1 to 51 case-sensitive characters
without any spaces. The string cannot be all numbers. NOTE:
When double quotation marks are used around the string, spaces are
allowed in the string. |
Usage Scenario
The extended community attributes help flexibly control the route-policy. You can use the if-match extcommunity-filter command to configure a node to filter routes based on the extended community filter. After such a matching rule is configured, you can apply the apply clauses to change the attributes of the routes that match the extended community attributes-based matching rule.
The if-match extcommunity-filter command is applicable to only BGP routes and must work in conjunction with the ip extcommunity-filter command. For example:
Prerequisites
Before using the if-match extcommunity-filter command, you must use the ip extcommunity-filter command to configure an extended community filter.
Configuration Impact
When you filter routes based on the extended community attributes, the routes that match the matching rule are permitted and the routes that do not match the matching rule are denied.
Precautions
A maximum of 16 extended community filters can be configured in the if-match extcommunity-filter command.