The apply community community-list command applies a BGP community list.
The undo apply community community-list command deletes the configuration.
By default, no BGP community attributes are applied.
Parameter | Description | Value |
---|---|---|
additive |
Indicates that community attributes are added to the routes that match the filtering conditions. |
- |
community-list community-list-name |
Specifies the name of a BGP community list. |
The value is a string of 1 to 63 case-sensitive characters starting with a letter, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
The community attribute, a private attribute of BGP, simplifies the application of routing policies and facilitates route maintenance and management. A community is a set of destination addresses with the same characteristics. These addresses have no physical boundary and are independent of their ASs. They share one or multiple community attributes, which can be changed or set using the apply community command.
Prerequisites
A route-policy has been configured using the route-policy command.
Configuration Impact
If the apply community command is configured in a route-policy, the community attributes of the BGP routes that match the route-policy are changed based on the configurations in the route-policy.
For example, the original community attribute of a BGP route is 30. If this BGP route matches a route-policy, the AS number is replaced or added based on the route-policy.<HUAWEI> system-view [~HUAWEI] ip community-list community1 [*HUAWEI-community-list-community1] quit [*HUAWEI] route-policy setcommunity permit node 16 [*HUAWEI-route-policy] if-match as-path-filter 8 [*HUAWEI-route-policy] apply community community-list community1