apply extcommunity redirect vpn-target

Function

The apply extcommunity redirect vpn-target command applies a redirection VPN-Target extended community attribute to routes matching specified filtering rules.

The undo apply extcommunity redirect vpn-target command restores the default configuration.

By default, no redirection VPN-Target extended community attribute is applied to routes matching specified filtering rules.

Format

apply extcommunity redirect vpn-target extCmntyValue

undo apply extcommunity redirect vpn-target

Parameters

Parameter Description Value
extCmntyValue

Indicates the value of VPN-Target extended community.

The value of VPN-Target extended community can be expressed in any of the following formats:

  • 2-byte AS number:4-byte user-defined number, for example, 1:3. The AS number ranges from 0 to 65535, and the user-defined number ranges from 0 to 4294967295.
  • IPv4-address:2-byte user-defined number, for example, 192.168.122.15:1. The IP address ranges from 0.0.0.0 to 255.255.255.255, and the user-defined number ranges from 0 to 65535.
  • Integral 4-byte AS number:2-byte user-defined number, for example, 0:3 or 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535.
  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers ranging from 1 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535.
vpn-target

Indicates the VPN-Target extended community.

-

Views

Route-policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

To apply a redirection extended community attribute to BGP FlowSpec routes matching specified filtering rules, run the apply extcommunity redirect command. To enable BGP FlowSpec routes to redirect traffic to a VPN instance with RT as-number:nn, specify the vpn-target as-number:nn number to add a VPN target extended community attribute to these routes. Upon receipt of the traffic, the VPN instance will forward the traffic based on its own forwarding table.

Prerequisites

A route-policy has been configured.

Configuration Impact

If a route matches the filtering rules of a specified route-policy, the redirection extended community attribute will be applied to the route.

Example

# Apply the redirection extended community attribute 100:1 to routes matching specified filtering rules.
<HUAWEI> system-view
[~HUAWEI] route-policy aaa permit node 10
[*HUAWEI-route-policy] apply extcommunity redirect vpn-target 100:1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >