apply extcommunity rt

Use apply extcommunity rt to set the RT extended community attribute for BGP routes.

Use undo apply extcommunity rt to remove the RT extended community attribute for BGP routes.

Syntax

apply extcommunity { rt route-target }&<1-32> [ additive ]

undo apply extcommunity [ { rt route-target }&<1-32> ]

Default

No RT extended community attribute is set for BGP routes.

Views

Routing policy node view

Predefined user roles

network-admin

Parameters

{ rt route-target }&<1-32>: Sets the RT extended community attribute, a string of 3 to 21 characters. &<1-32> indicates that you can specify a maximum of 32 RT extended community attributes.

An RT attribute has the following forms:

additive: Adds the specified attribute to the original extended community attribute.

Usage guidelines

If you do not specify any parameters, the undo form of the command removes all extended community attributes for BGP routes.

Examples

# Configure node 10 in permit mode for routing policy policy1 to add the RT extended community attribute 100:2 to BGP routes matching AS path list 1.

<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy-policy1-10] if-match as-path 1
[Sysname-route-policy-policy1-10] apply extcommunity rt 100:2 additive