The if-match extcommunity-filter command sets a filtering rule that is based on the VPN-Target extended community filter.
The undo if-match extcommunity-filter command cancels the configuration.
By default, no filtering rule based on the VPN-Target extended community filter is set.
Parameter | Description | Value |
---|---|---|
basIndex |
Specifies the number of the basic VPN-Target extended community filter. |
The value is an integer ranging from 1 to 199. |
advIndex |
Specifies the number of the advanced VPN-Target extended community filter. |
The value is an integer ranging from 200 to 399. |
ecfName |
Specifies the name of the VPN-Target extended community filter. |
The value is a string of 1 to 51 case-sensitive characters, spaces not supported. The string cannot be all numbers. 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 VPN-Target extended community filter. After such a filtering rule is configured, you can apply the apply clauses to change the attributes of the routes that match the VPN-Target extended community attributes-based filtering rule.
The if-match extcommunity-filter command is applicable only to BGP routes and must work with the ip extcommunity-filter command. For example:Prerequisites
A VPN-Target extended community filter has been configured using the ip extcommunity-filter command.
Configuration Impact
When you filter routes based on the VPN-Target extended community attributes, the routes that match the filtering rule are permitted and the routes that do not match the filtering rule are denied.
Precautions
A maximum of 16 VPN-Target extended community filters can be configured in the if-match extcommunity-filter command. The relationship between these VPN-Target extended community filters is OR. Specifically, if a route matches one of these VPN-Target extended community filters, it matches the matching rules of the command.