![Huawei S6700 Series Скачать руководство пользователя страница 418](http://html.mh-extra.com/html/huawei/s6700-series/s6700-series_configuration-manual_169517418.webp)
Similar to a BGP community filter, a BGP extcommunity filter is used to filter private
network routes.
Perform the following steps on a BGP switch:
1.
Run:
system-view
The system view is displayed.
2.
Perform either of the following operations as required to configure an extcommunity
filter.
–
To configure a basic extcommunity filter, run the
ip extcommunity-filter
{
basic-
extcomm-filter-num
|
basic
basic-extcomm-filter-name
} {
deny
|
permit
} {
rt
{
as-number
:
nn
|
ipv4-address
:
nn
} } &<1-16> command.
–
To configure an advanced extcommunity filter, run the
ip extcommunity-filter
{
adv-extcomm-filter-num
|
advanced
adv-extcomm-filter-name
} {
deny
|
permit
}
regular-expression
command.
Multiple entries can be defined in an extcommunity filter. The relationship between
the entries is "OR". This means that if a route matches one of the rules, the route
matches the filter.
l
Configure a route-policy.
A route-policy is used to match routes or route attributes, and to change route attributes
when specific conditions are met. As the preceding filters can be used as matching
conditions of a route-policy, the route-policy is powerful in functions and can be used
flexibly.
Perform the following steps on a BGP switch:
1.
Run:
system-view
The system view is displayed.
2.
Run:
route-policy
route-policy-name
{
permit
|
deny
}
node
node
A node is configured for a route-policy, and the view of the route-policy is displayed.
A route-policy consists of multiple nodes. For example, the
route-policy
route-
policy-example permit node 10
command specifies node 10 and the
route-policy
route-policy-example deny node 20
command specifies node 20. The two nodes
belong to the route-policy specified by
route-policy-example
. The relationship
between the nodes of a route-policy is "OR". The details are as follows:
–
If a route matches one node, the route matches the route-policy and will not be
matched with the next node. For example, there are two nodes defined using the
route-policy
route-policy-example permit node 10
and
route-policy
route-
policy-example deny node 20
commands. If a route matches the node defined
using the
route-policy
route-policy-example permit node 10
command, the route
will not be matched with the node defined using the
route-policy
route-policy-
example deny node 20
command.
–
If a route does not match any node, the route fails to match the route-policy.
When a route-policy is used to filter a route, the route is first matched with the node
with the smallest
node
value. For example, if two nodes are configured using the
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.
399