The apply comm-filter delete command deletes a BGP community attribute based on the specified value in a community filter.
The undo apply comm-filter command cancels the configuration.
By default, the community attributes of BGP routes are not deleted.
Parameter | Description | Value |
---|---|---|
basIndex |
Specifies the number of a basic community filter. |
The value is an integer ranging from 1 to 99. |
advIndex |
Specifies the number of an advanced community filter. |
The value is an integer ranging from 100 to 199. |
cmntyName |
Specifies the name of the 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 community attribute is a private attribute of BGP, and the apply comm-filter delete command is valid only for BGP routes.
When the apply comm-filter delete command is run in the Route-policy view to delete the values from the community filter, only one community attribute can be specified in the ip community-filter command. If multiple community attributes are configured in the same community filter, running the apply comm-filter delete command cannot delete these community attributes. To delete the community attributes, you need to run the ip community-filter command several times to configure community attributes one by one, and then run the apply comm-filter delete command to delete these community attributes.Prerequisites
A route-policy has been configured using the route-policy command.
Configuration Impact
After routes match the filtering conditions, the specified community attributes are deleted from these routes.
Precautions
[*HUAWEI] display route-policy
Route-policy: RP1 permit : 10 (matched counts: 0) Apply clauses: apply comm-filter 1 delete apply community 999:9 additive <h1 id="the-following-shows-the-community-filter-1">The following shows the community-filter 1.</h1>[*HUAWEI] display ip community-filter
Community filter Number: 1 index: 10 permit 111:1 index: 20 permit 999:9 In this case, When you use the Route-Policy named RP1 to filter BGP routes, the community attribute 111:1 of the corresponding BGP routes is deleted and the community attribute 999:9 is added.<HUAWEI> system-view [~HUAWEI] ip community-filter 1 permit 1:200 [*HUAWEI] ip community-filter 1 permit 2:200 [*HUAWEI] ip community-filter 1 permit 3:200 [*HUAWEI] route-policy test permit node 10 [*HUAWEI-route-policy] apply comm-filter 1 delete