apply

Function

The apply command sets a route attribute for the routes that meet matching rules.

By default, no route attribute is set for the routes that meet matching rules.

Format

apply action-clause

Parameters

Parameter Description Value
action-clause

Specifies an action clause.

The value can be as follows:

  • Setting common protocol attributes
  • Setting community attributes for BGP routes
  • Setting the AS_Path attribute for BGP routes
  • Setting attributes related to BGP route selection
  • Setting BGP-specific attributes
  • Setting IGP-specific attributes
  • Setting the RT attribute for VPN routes
  • Setting the SoO attribute for VPN routes
  • Setting Redirection Extended Community Attributes for BGP Routes
  • Setting color extended community attributes for BGP Routes
  • Setting bandwidth extended community attributes for BGP Routes

Views

Route-filter policy view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

Route-filters are used to filter routes based on sets or a single element and modify route attributes of the routes that meet matching rules. To set a route attribute for the routes that meet matching rules, run the apply command.

The parameters in action clauses can be specific values or global variables referenced using $+global variable name. The parameters in a route-filter with pre-defined variables can be those defined in this route-filter.

Global variables cannot be referenced by the route attribute sets in the format of {element A, element B...}.

Example

# Configure a route-filter and set the AS_Path attribute for the BGP routes with MED 100.
<HUAWEI> system
[~HUAWEI] xpl route-filter route-filter
[~HUAWEI-xpl-filter] if med eq 100 then
[~HUAWEI-xpl-filter-if] apply as-path '100 200 300' overwrite
[~HUAWEI-xpl-filter-if] endif
[~HUAWEI-xpl-filter] end-filter
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >