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 deletes the matching rule based on the specified extended community filter.
By default, no matching rule based on the extended community filter is configured.
Product |
Support |
---|---|
S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S |
Supported. |
S2720-EI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, and S6720S-LI |
Not supported. |
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 a basic extended community filter. | It is an integer ranging from 1 to 199. |
adv-extcomm-filter-num | Specifies the number of an advanced extended community filter. | It is an integer ranging from 200 to 399. |
extcomm-filter-name | Specifies the name of an extended community filter. | The name is a string of 1 to 51 case-sensitive characters without spaces. The string cannot be all numerals. |
Usage Scenario
The extended community attributes help flexibly control the routing policy. You can use the if-match extcommunity-filter command to configure a node to filter routes based on the extended community filter.
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:
Multiple if-match extcommunity-filter clauses can be specified. The relationship between if-match extcommunity-filter clauses is "OR". The relationship between if-match clauses is "AND".
Prerequisites
Before using the if-match extcommunity-filter command, you must use the ip extcommunity-filter command to configure an extended community filter.
Precautions
The routing policy matches routes using the extended community filter. Routes that match the extended community filter will be checked by other if-match clauses of this node. Routes that do not match the extended community filter will be checked by the next node.
A maximum of 16 extended community filters can be configured in the if-match extcommunity-filter command. The relationship between these extended community filters is OR. Specifically, if a route matches one of these extended community filters, it matches the matching rules of the command.