The if-match large-community-filter command sets a filtering rule that is based on a Large-Community filter.
The undo if-match large-community-filter command deletes the configured filtering rule.
By default, no filtering rule based on a Large-Community filter is set.
Parameter | Description | Value |
---|---|---|
large-comm-filter-name |
Specifies the name of a Large-Community filter. |
The value is a string of 1 to 51 case-sensitive characters and cannot contain digits only. Spaces are allowed only when the string is enclosed in double quotation marks (" "). |
whole-match |
Indicates exact match. |
- |
Usage Scenario
The Large-Community attribute is a private attribute of BGP. Therefore, you can run the if-match large-community-filter command to filter BGP routes with a specified Large-Community attribute value. For the filtering rule to take effect, run the ip large-community-filter command to define a Large-Community filter first. For example:
Prerequisites
A Large-Community filter has been configured using the ip large-community-filter command.
Configuration Impact
The BGP routes that match a filtering rule based on the Large-Community attribute are permitted, and the BGP routes that do not match a filtering rule based on Large-Community attribute are denied.
<HUAWEI> system-view [~HUAWEI] ip large-community-filter basic a permit 100:200:300 [*HUAWEI] route-policy test permit node 11 [*HUAWEI-route-policy] if-match large-community-filter a whole-match
<HUAWEI> system-view [~HUAWEI] ip large-community-filter basic aa permit 1:1:1 [*HUAWEI] route-policy test permit node 12 [*HUAWEI-route-policy] if-match large-community-filter aa
<HUAWEI> system-view [~HUAWEI] ip large-community-filter basic a permit 100:200:300 [*HUAWEI] route-policy test permit node 10 [*HUAWEI-route-policy] if-match large-community-filter a