route-policy
route-policy-example permit node 10
and
route-policy
route-policy-
example deny node 20
commands, a route is first matched with the node configured
using the
route-policy
route-policy-example permit node 10
command.
NOTE
The S6700 considers that each unmatched route fails to match the route-policy by default. If
more than one node is defined in a route-policy, at least one of them must be in
permit
mode.
3.
(Optional) Perform the following operations as needed to configure
if-match
clauses
for current nodes of the route-policy.
if-match
clauses are used to filter routes. If no
if-match
clause is specified, all routes
will match the node in the route-policy.
–
To match an ACL, run the
if-match acl
{
acl-number
|
acl-name
} command.
–
To match an IP prefix list, run the
if-match ip-prefix
ip-prefix-name
command.
NOTE
The
if-match acl
and
if-match ip-prefix
commands cannot be used together in the same
node of a route-policy, because the latest configuration will override the previous one.
–
To match the AS-Path attribute of BGP routes, run the
if-match as-path-filter
{
as-path-filter-number
|
as-path-filter-name
} &<1-16> command.
–
To match the community attribute of BGP routes, run either of the following
commands:
–
if-match community-filter
{
basic-comm-filter-num
[
whole-match
] |
adv-
comm-filter-num
}
*
&<1-16>
–
if-match community-filter
comm-filter-name
[
whole-match
]
–
To match the extended community attribute of BGP routes, run the
if-match
extcommunity-filter
{ {
basic-extcomm-filter-num
|
adv-extcomm-filter-num
}
&<1-16> |
basic-extcomm-filter-name
|
advanced-extcomm-filter-name
}
command.
The operations in Step 3 can be performed in any order. A node may have multiple
if-match
clauses or no
if-match
clause.
NOTE
The relationship between the
if-match
clauses in a node of a route-policy is "AND". A route
must match all the rules before the action defined by the
apply
clause is taken. For example,
if two
if-match
clauses (
if-match acl 2003
and
if-match as-path-filter 100
) are defined in the
route-policy
route-policy-example permit node 10
command, a route is considered to match
node 10 only when it matches the two
if-match
clauses.
4.
(Optional) Perform the following operations as needed to configure
apply
clauses for
current nodes of the route-policy:
apply
clauses can be used to set attributes for routes matching
if-match
clauses. If
this step is not performed, the attributes of routes matching
if-match
clauses keep
unchanged.
–
To replace or add a specified AS number in the AS_Path attribute of a BGP route,
run the
apply as-path
as-number
command.
–
To delete a specified BGP community attribute from a route, run the
apply comm-
filter
comm-filter-number
delete
command.
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.
400