10.3.2 Creating a Route-Policy
By applying a Route-Policy, you can set attributes for the imported routes according to
networking requirements.
Context
Perform the following steps on the router to which the Route-Policy is applied:
Procedure
Step 1
Run:
system-view
The system view is displayed.
Step 2
Run:
route-policy
route-policy-name
{
permit
|
deny
}
node
node
A node of the Route-Policy is created and the Route-Policy view is displayed.
l
The parameter
permit
specifies a node in a Route-Policy in
permit
mode. If a route matches
the node, the router performs actions defined by the
apply
clauses and the matching is
complete. Otherwise, the route continues to match the next nod.
l
The parameter
deny
specifies a node in a Route-Policy in
deny
mode. In
deny
mode, the
apply
clauses are not used. If a route entry matches all the
if-match
clauses of the node, the
route is denied by the node and the next node is not matched. If the entry does not match all
the clauses, the next node is matched.
NOTE
In the NE80E/40E, by default, the unmatched routes are denied. If multiple nodes are defined in a Route-
Policy, at least one of them should be in
permit
mode.
When the parameter
route-policy
is used to filter routes, note the following:
l
If a route does not match any node, it is denied by the Route-Policy.
l
If all the nodes in the routing policy are in
deny
mode, all the routes are denied by the Route-
Policy.
When a Route-Policy is used to filter the routing information, the node with the smaller value
of
node
is tested first.
Step 3
(Optional) Run:
description
text
The description of the routing policy is configured.
----End
10.3.3 (Optional) Configuring the If-Match Clause
The
if-match
clauses define the rules for matching certain route attributes.
HUAWEI NetEngine80E/40E Router
Configuration Guide - IP Routing
10 Routing Policy Configuration
Issue 02 (2014-09-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
1201