edit xpl as-path-list

Function

The edit xpl as-path-list command displays the AS_Path set paragraph editing interface view.

By default, no AS_Path sets are configured.

Format

edit 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

User 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 AS_Path data used by a route-filter to filter BGP routes. To enter the AS_Path set paragraph editing interface view, run the edit xpl as-path-list command.

To configure an AS_Path set in the AS_Path set paragraph editing interface view, perform the following steps:

  1. Configure a start clause (xpl as-path-list as-path-list-name) for an AS_Path set.
  2. 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.
  3. Configure an end clause (end-list) for 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.

Example

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