The apply extcommunity command configures extended community attributes for BGP routes.
The undo apply extcommunity command cancels the configuration.
By default, no BGP extended community attributes are configured.
apply extcommunity { rt { as-number:nn | 4as-number:nn | ipv4-address:nn } } & <1-16> [ additive ]
undo apply extcommunity
| Parameter | Description | Value |
|---|---|---|
| rt | Indicates the route-target extended community. | - |
| as-number | Specifies the AS number. | The value is an integer ranging from 0 to 65535. |
| 4as-number | Indicates a 4-byte AS number. | A 4-byte AS number is divided into the following types:
|
| ipv4-address | Specifies the IPv4 address. | It is in dotted decimal notation. |
| nn | Specifies an integer. | For as-number, the value of nn ranges from 0 to 4294967295; for 4as-number, the value ranges from 0 to 65535; for ipv4-address, the value of nn ranges from 0 to 65535. |
| additive | Indicates that existing community attributes can be added to routes. | - |
Usage Scenario
At present, RT extended community attributes can be set only through the route-policy. This command cannot specify an extended community attribute for public routes.
Prerequisites
The apply extcommunity command can be used only after a route-policy is configured.
Configuration Impact
After a route matches a route-policy, you can change the RT extended community attribute of the route.
Precautions
If the keyword additive is not set in the apply extcommunity command, the original extended community attribute is replaced.
VPN routes may be imported in some scenarios. For example, if VPNA wants to learn routes from VPNB, configure a route-policy and run the apply extcommunity command. If the outbound interface of the VPNB routes to be learned by VPNA is a VLANIF interface, Dot1Q VLAN tag termination sub-interface, the route-policy must allow VPNA to learn the 32-bit routes of VPNB. If no such route-policy is configured, forwarding VPNA traffic through the learned VPNB routes will trigger invalid ARP Miss messages to be generated, causing high CPU usage.