ip large-community-filter advanced

Function

The ip large-community-filter advanced command sets an advanced Large-Community filter.

The undo ip large-community-filter advanced command deletes an advanced configured Large-Community filter.

By default, no advanced Large-Community filter is configured.

Format

ip large-community-filter advanced large-comm-filter-name [ index index-number ] matchMode regular-expression

undo ip large-community-filter advanced large-comm-filter-name [ index index-number ] [ matchMode regular-expression ]

Parameters

Parameter Description Value
large-comm-filter-name

Specifies the name of an advanced Large-Community filter.

The value is a string of 1 to 51 case-sensitive characters. The string cannot be all digits.

index index-number

Specifies the index of a Large-Community filter.

The value is an integer ranging from 1 to 4294967295.

matchMode

Sets the matching mode of a Large-Community filter.

The value is an enumerated type:

  • permit: Sets the matching mode of a Large-Community filter to permit.
  • deny: Sets the matching mode of a Large-Community filter to deny.
regular-expression

Specifies a regular expression that matches BGP routes with the Large-Community attribute.

The value is a string of 1 to 1024 characters without spaces.

advanced

Sets an advanced Large-Community filter.

-

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

The Large-Community attribute is a private attribute of BGP and can be flexibly applied to route-policies. The ip large-community-filter command works with the if-match large-community-filter command so that a filtering rule based on a specific Large-Community filter can be used to filter BGP routes.

Follow-up Procedure

Run the display ip large-community-filter command to view detailed configuration of the Large-Community filter.

Precautions

The relationship between the rules in a Large-Community filter is "AND", which is different from that in an RD filter. This is because each route has only one RD but can have multiple Large-Community values.

By default, a Large-Community filter works in deny mode. BGP routes that fail one of the filtering rules do not match the Large-Community filter. If all matching rules in a Large-Community filter work in deny mode, all BGP routes are denied by the filter. To prevent this problem, configure a matching rule in permit mode after one or more matching rules in deny mode so that the routes except for those denied by the preceding filtering rules match the filter.

Example

# Configure an advanced Large-Community filter whose name is aa.
<HUAWEI> system-view
[~HUAWEI] ip large-community-filter advanced aa permit ^10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >