The if-match as-path-filter command sets a filtering rule that is based on the AS_Path filter.
The undo if-match as-path-filter command cancels the configuration.
By default, no filtering rule based on the AS_Path filter is set.
Parameter | Description | Value |
---|---|---|
apfIndex |
Specifies the number of the AS_Path filter. |
The value is an integer ranging from 1 to 256. |
apfName |
Specifies the name of an AS_Path filter. |
The value is a string of 1 to 51 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
The AS_Path attribute is a proprietary attribute of BGP. The if-match as-path-filter command is applicable mainly to BGP routes. The ip as-path-filter command must be used to define an AS_Path filter so that the filtering rule based on this AS_Path filter can take effect. For example:
Prerequisites
An AS_Path filter has been configured using the ip as-path-filter command.
Precautions
A maximum of 16 AS_Path filters can be configured in the if-match as-path-filter command. The relationship between these AS_Path filters is OR. Specifically, if a route matches one of these AS_Path filters, it matches the matching rules of the command.
<HUAWEI> system-view [~HUAWEI] ip as-path-filter 2 permit _200_300 [*HUAWEI] route-policy test permit node 10 [*HUAWEI-route-policy] if-match as-path-filter 2