![Huawei S6700 Series Configuration Manual Download Page 417](http://html.mh-extra.com/html/huawei/s6700-series/s6700-series_configuration-manual_169517417.webp)
Metacharacter
Description
{n}
Repeats "n" times. "n" is a non-negative integer.
{n,}
Repeats at least "n" times. "n" is a non-negative integer.
{n,m}
Repeats "n" to "m" times. "m" and "n" are both non-negative
integers, and "n" is equal to or smaller than "m". Note that
there is no space between "n" and the comma, or between the
comma and "m".
For example, ^10 indicates that only the AS_Path attribute starting with 10 is matched.
A circumflex (^) indicates that the beginning of a character string is matched.
Multiple rules, permit or deny, can be specified in a filter. The relationship between
theses rules is "OR". This means that if a route meets one of the matching rules, the
route matches the AS_Path filter.
NOTE
For details on a regular expression, see the
S6700 Series Ethernet Switches Configuration
Guide - Basic Configurations
.
l
Configure a community filter.
A BGP community attribute is used to identify a group of routes with the same properties.
Routes can be classified by community attribute. This facilitates route management.
Some AS internal routes may not need to be advertised to any other AS, whereas AS external
routes need to be advertised to other ASs. These AS external routes have different prefixes
(as a result, an IP prefix list is inapplicable) and may come from different ASs (as a result,
an AS_Path filter is inapplicable). You can set a community attribute value for these AS
internal routes and another community attribute value for these AS external routes on an
ASBR to control and filter these routes.
Perform the following steps on a BGP switch:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ip community-filter
A community filter is configured.
–
To configure a standard community filter, run the
ip community-filter
{
basic
comm-filter-name
{
permit
|
deny
} [
community-number
|
aa:nn
]
*
&<1-9> |
basic-comm-filter-num
{
permit
|
deny
} [
community-number
|
aa:nn
]
*
&<1-16> } [
internet
|
no-export-subconfed
|
no-advertise
|
no-export
]
*
command.
–
To configure an advanced community filter, run the
ip community-filter
{
advanced
comm-filter-name
|
adv-comm-filter-num
} {
permit
|
deny
}
regular-
expression
command.
l
Configure an extcommunity filter.
S6700 Series Ethernet Switches
Configuration Guide - IP Routing
7 BGP Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
398