xpl community-list

Function

The xpl community-list command creates a community set and displays the community set view.

The undo xpl community-list command deletes a specified community set.

By default, no community sets are configured.

Format

xpl community-list community-list-name

undo xpl community-list community-list-name

Parameters

Parameter Description Value
community-list-name

Specifies the name of a community 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

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

Follow-up Procedure

  1. Configure elements in the format of aa:nn (100:1 for example), a community number, or a known community (internet, no-export-subconfed, no-advertise, or no-export) for the community set and separate every two neighboring elements with a comma (,). Alternatively, configure elements in the format of regular regular-expression, which matches routes with community attributes in the specified regular expression. An asterisk () can be used in an element to match any digit, 100: for example. 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.

    The community-based regular expression can be set to a character string in either the aa:nn format or integer format. The following are two examples:

    The regular ^1:1$ configuration matches routes that carry the community value of 65537 or 1:1.

    The regular ^65537$ configuration also matches routes that carry the community value of 65537 or 1:1.
  2. Run the end-list command in the community set view to conclude the configuration of the community set.

Precautions

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

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

Example

# Configure a community set named community1.
<HUAWEI> system-view
[~HUAWEI] xpl community-list community1
[~HUAWEI-xpl-community] 100:1,
[~HUAWEI-xpl-community] 200:1,
[~HUAWEI-xpl-community] 300:1
[~HUAWEI-xpl-community] end-list
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >