484
Configuring IPv6 PBR
Overview
Policy-based routing (PBR) uses user-defined policies to route packets. A policy can specify the next
hop for packets that match specific criteria such as ACLs.
A device forwards received packets using the following process:
1. The device uses PBR to forward matching packets.
2. If the packets do not match the PBR policy or the PBR-based forwarding fails, the device uses
the routing table, excluding the default route, to forward the packets.
3. If the routing table-based forwarding fails, the device uses the default route to forward packets.
PBR includes local PBR and interface PBR.
• Local PBR guides the forwarding of locally generated packets, such as the ICMP packets
generated by using the ping command.
• Interface PBR guides the forwarding of packets received on an interface only.
Policy
An IPv6 policy includes match criteria and actions to be taken on the matching packets. A policy can
have one or multiple nodes as follows:
• Each node is identified by a node number. A smaller node number has a higher priority.
• A node contains if-match and apply clauses. An if-match clause specifies a match criterion,
and an apply clause specifies an action.
• A node has a match mode of permit or deny.
An IPv6 policy compares packets with nodes in priority order. If a packet matches the criteria on a
node, it is processed by the action on the node. Otherwise, it goes to the next node for a match. If the
packet does not match the criteria on any node, it is forwarded according to the routing table.
if-match clause
IPv6 PBR supports the if-match acl clause to set an ACL match criterion. On a node, you can
configure only one if-match clause.
apply clause
IPv6 PBR supports the apply next-hop clause to set next hops.
Relationship between the match mode and clauses on the node
Does a packet match all
the if-match clauses on the
In permit mode In deny mode
Yes
• If the node is configured with
apply clauses, IPv6 PBR
executes the apply clauses on
the node. If the IPv6
PBR-based forwarding
succeeds, IPv6 PBR does not
compare the packet with the
next node.
• If the node is configured with
no apply clauses, the packet
The packet is forwarded according
to the routing table.