Follow-up Procedure
Note the following when configuring PBR:
l You can use the policy to import the routes or to forward the IP packets.
l You can specify the routing policy by using the if-match and apply clauses.
l A single policy can include multiple if-match clauses, such as if-match acl and if-match
packet-length, which can be used in combination.
– If if-match acl acl-number is used repeatedly to set ACL rules, the new configuration
supersedes the old configuration.
– If if-match packet-length min-length max-length is used repeatedly to set ACL rules,
the new configuration supersedes the old configuration.
l permit means allowing the packets matching the rule to pass during the policy-based
routing; deny means denying the packets that match the rule to pass during the policy-based
routing.
l A routing policy contains several policy nodes. Each policy node is specified by a node-
id. The smaller the node-id is, the higher the preference of the policy node is. The policy
of a higher preference is first executed.
8.3.3 Defining Actions of PBR
This part describes how to define actions of PBR, including setting the outbound interface and
nexthop for a packet.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
policy-based-route policy-name { deny | permit } node node-id
A policy or a policy node is created.
Step 3 Run:
apply ip-precedence precedence
The precedence of the IP packet is set.
Step 4 Run:
apply ip-address default next-hop ip-address1 [ ip-address2 ]
The default next hop of the packet is specified.
NOTE
The default next hop cannot be a local IP address.
Step 5 Run:
apply default output-interface interface-type1 interface-number1 [ interface-type2
interface-number2 ]
The default outbound interface of the packet is specified.
Huawei AR150&200 Series Enterprise Routers
Configuration Guide - IP Service 8 IP Unicast PBR Configuration
Issue 02 (2012-03-30) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
195