xpl as-path-list

Function

The xpl as-path-list command creates an AS_Path set and displays the AS_Path set view.

The undo xpl as-path-list command deletes a specified AS_Path set.

By default, no AS_Path sets are configured.

Format

xpl as-path-list as-path-list-name

undo xpl as-path-list as-path-list-name

Parameters

Parameter Description Value
as-path-list-name

Specifies the name of an AS_Path set.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

An AS_Path set is a group of data related to the AS_Path attribute and can be used by route-filters to filter BGP routes. To create an AS_Path set and enter the AS_Path set view, run the xpl as-path-list command.

Follow-up Procedure

  1. Configure elements for the set and separate every two neighboring elements with a comma (,). The elements can be configured in any of the following formats:
    • length { eq | ge | le } as-length: matches BGP routes with AS_Path length equal to (eq), greater than or equal to (ge), or less than or equal to (le) as-length. The value of as-length is an integer ranging from 0 to 2047.
    • unique-length { eq | ge | le } as-length: matches BGP routes with AS_Path length equal to (eq), greater than or equal to (ge), or less than or equal to (le) as-length (duplicate AS numbers are counted as one). The value of as-length is an integer ranging from 0 to 2047.
    • origin as-path [ whole-match ]: matches BGP routes with AS_Path whose rightmost AS numbers are the same as as-path. The as-path parameter is enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. Duplicate AS numbers are counted as one unless whole-match is configured.
    • peer-is as-path [ whole-match ]: matches BGP routes with AS_Path whose leftmost AS numbers are the same as as-path. The as-path parameter is enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. Duplicate AS numbers are counted as one unless whole-match is configured.
    • pass as-path [ whole-match ]: matches BGP routes with AS_Path whose contiguous AS numbers match as-path. The as-path parameter is enclosed in single quotation marks, with every two neighboring AS numbers separated with a space. Duplicate AS numbers are counted as one unless whole-match is configured.
    • regular regular-expression: matches BGP routes with AS_Path in the specified regular expression. For detailed description about regular expressions, see Configuration Guide - Basic Configuration.

      Regular expression processing is computing-intensive. When a large number of regular expressions are configured in an XPL policy to match a BGP route attribute and the length of the route attribute is long, the processing performance of the XPL policy deteriorates. To improve the processing performance of the routing policy, decrease the number of regular expressions or use a non-regular expression matching command.

      It is recommended that a maximum of 100 regular expressions be configured for each policy.
  2. Run the end-list command in the AS_Path set view to conclude the configuration of the AS_Path set.

Precautions

An AS_Path set is only a group of data used as matching rules and does not have the permit or deny function. Therefore, an AS_Path set can be used to filter routes only after it is referenced by a route-filter.

To exit from the AS_Path set view, run the abort command in the AS_Path set view.

Example

# Configure an AS_Path set named as_path1.
<HUAWEI> system-view
[~HUAWEI] xpl as-path-list as_path1
[~HUAWEI-xpl-as] regular 1_2_3_4,
[~HUAWEI-xpl-as] regular ^200$,
[~HUAWEI-xpl-as] regular 100
[~HUAWEI-xpl-as] end-list
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >