< Home

apply extcommunity

Function

The apply extcommunity command sets the action for changing the extended community attribute of BGP routes in a routing policy.

The undo apply extcommunity command restores the default setting.

By default, the action for changing the extended community attribute of BGP routes is not set in a routing policy.

Product

Support

S5720-EI, S5720-HI, S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730-HI, S5730S-EI, S5730-SI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6720S-SI, S6720-SI, S6730-H, S6730S-H, S6730-S, and S6730S-S

Supported.

S2720-EI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, and S6720S-LI

Not supported.

Format

apply extcommunity { rt { as-number:nn | 4as-number:nn | ipv4-address:nn } } &<1-16> [ additive ]

undo apply extcommunity

Parameters

Parameter Description Value
rt Indicates the route-target extended community. A maximum of 16 route targets can be configured. -
as-number Specifies the AS number. The value is an integer ranging from 0 to 65535.
4as-number Specifies a 4-byte AS number.
A 4-byte AS number is divided into the following types:
  • It is an integer ranging from 65536 to 4294967295.
  • It is in the format of x.y, where x and y are integers that range from 1 to 65535 and from 0 to 65535, respectively
ipv4-address Specifies the IPv4 address. It is in dotted decimal notation.
nn Specifies an integer.
  • When the value of as-number is a 2-byte AS number, the value of nn ranges from 0 to 4294967295.
  • When the value of 4as-number is a 4-byte AS number, the value of nn 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. -

Views

Route-Policy view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When controlling inter-AS VPN route receiving and advertising, apply the routing policy that contains the apply extcommunity command to change the RT extended community attribute of matched routes. Currently, only the RT extended community attribute is supported. This command cannot specify an extended community attribute for public routes.

Prerequisites

The apply extcommunity command can be used only after the route-policy command is used.

Precautions

When the routing policy that contains the action is used in the BGP view, BGP IPv4 unicast address view, or BGP IPv6 unicast address view, the action does not take effect.

When a routing policy takes effect, it affects inter-AS VPN route receiving and advertising.

If the keyword additive is not set in the apply extcommunity command, the original extended community attribute is replaced.

Example

# Add 100:2, 10.1.1.1:22, 100.100:100 to the VPN route-target extended community attribute of BGP.

<HUAWEI> system-view
[HUAWEI] route-policy policy permit node 10
[HUAWEI-route-policy] apply extcommunity rt 100:2 rt 10.1.1.1:22 rt 100.100:100 additive
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >