![Huawei S6700 Series Скачать руководство пользователя страница 405](http://html.mh-extra.com/html/huawei/s6700-series/s6700-series_configuration-manual_169517405.webp)
in the form of a network prefix uniquely. An IPv4 prefix list named
abcd
is used as
an example.
#
ip ip-prefix abcd index 10 permit 1.0.0.0 8
ip ip-prefix abcd index 20 permit 2.0.0.0 8
During route matching, the system checks the entries by index number in ascending
order. If a route matches an entry, the route will not be matched with the next entry.
The S6700 denies all unmatched routes by default. If all entries in an IPv4 prefix list
are in deny mode, all routes will be denied by the IPv4 prefix list. In this case, you
must define an entry
permit 0.0.0.0 0 less-equal 32
after the entries in deny mode to
allow all the other IPv4 routes to by permitted by the IPv4 prefix list.
NOTE
If more than one IP prefix entry is defined, at least one entry should be set in permit mode.
l
Configure an AS_Path filter.
An AS_Path filter is used to filter BGP routes based on the AS_Path attributes contained
in the BGP routes. If you do not want traffic to pass through an AS, configure an AS_Path
filter to filter out the traffic carrying the number of the AS. If the BGP routing table of each
device on a network is large, configuring an ACL or an IP prefix list to filter BGP routes
may be complicated and make it difficult to maintain new routes.
NOTE
If the AS_Path information of a summarized route is lost, the AS_Path filter cannot be used to filter
the summarized route, but can still be used to filter the specific routes from which the summarized
route is derived.
An AS_Path filter can be used as a matching condition of a route-policy or be used in the
peer as-path-filter
command.
Perform the following steps on a BGP switch:
1.
Run:
system-view
The system view is displayed.
2.
Run:
ip as-path-filter
{
as-path-filter-number
|
as-path-filter-name
}
{
permit
|
deny
}
regular-expression
An AS_Path filter is configured.
An AS_Path filter uses a regular expression to define matching rules. A regular
expression consists of the following parts:
–
Metacharacter: defines matching rules.
–
General character: defines matching objects.
Table 7-1
Metacharacters
Metacharacter
Description
\
Escape character.
.
Matches any single character except "\n", including spaces.
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.
386