Describes how policy-based routing enables routing decisions based on parameters beyond destination IP address, allowing granular traffic control and optimization.
Supported match and set operations
Supported match and set operations in PBR refer to the criteria that can be used to identify and manipulate network traffic for routing purposes.
-
Match operations include source IP, destination IP, source protocol/port, destination protocol/port, access-group, flow-tag, IP protocol, TCP flag, and port-range.
-
Set operations include nexthop IP, nexthop VRF, nexthop IP+VRF, and forward-class.
|
Criteria |
match/set |
|---|---|
|
source ip |
match |
|
destination ip |
match |
|
source protocol/port |
match |
|
destination protocol/port |
match |
|
nexthop ip |
set |
|
nexthop vrf |
set |
|
nexthop ip+vrf |
set |
|
forward-class |
set |
|
access-group |
match |
|
flow-tag |
match |
|
ip protocol |
match |
|
tcp-flag |
match |
|
port-range |
match |
Restrictions for implementing policy-based routing
These restrictions apply when implementing Policy-based routing.
-
QoS Group and Flow-tag are not supported together at the same time.
-
Bridge Group Virtual Interface (BVI) and Pseudowire Headend (PWHE) subinterfaces support PBR from Release 26.1.1.
-
BGP Flowspec feature and PBR are not supported together on the same interface.
-
A route-policy can have either 'set qos-group' or 'set flow-tag,' but not both for a prefix-set.
-
Route policy for qos-group and route policy flow-tag cannot have overlapping routes. The Quality-of-service Policy Propagation Using Border Gateway Protocol (QPPB) and flow tag features can coexist (on same as well as on different interfaces) as long as the route policy used by them do not have any overlapping route.
-
Mixing usage of qos-group and flow-tag in route-policy and policy-map is not recommended.
Configure policy-based routing
Procedure
-
Configure flow-tag.
-
Provision forward class using RPL.
-
Configure ACLs with policy-based routing.
Configure the flow-tag
Configure the Flow-tag to classify and manage traffic flows using route policies, class maps, and policy maps.
The Flow-tag feature allows you to mark and control traffic flows for advanced routing and policy-based forwarding. This procedure demonstrates how to define AS path sets, set Flow-tags, and apply related configurations.
Before you begin
Procedure
Flow-tag configuration is applied, and traffic is classified and forwarded according to the defined policies.
Provision forward class using RPL
Provisioning forward class using RPL involves configuring route policies that set the forward-class ID based on matching criteria such as community strings, VRFs, or next-hop addresses. This enables differentiated forwarding for traffic engineering tunnels.
-
Route policies can match on community strings, VRFs, or next-hop sets.
-
Forward-class IDs are set within the route policy and applied to BGP routes.
-
Traffic is forwarded through TE tunnels associated with the configured forward-class.
Before you begin
Use this sample configuration to provision forward class using RPL.
Procedure
In these examples, BGP on the receiving PE is configured with table policies that set the forward-class based on the matching criteria. The appropriate TE tunnel is selected for forwarding based on the forward-class ID.
For example, if a route matches community 6500:1, the route-policy sets forward-class 1, and traffic is forwarded through tunnel-te1. For VRF one and two, table-policies C1 and C2 set forward-class 1 and 2, selecting tunnel-te1 and tunnel-te2, respectively. When matching on next-hop 10.10.0.1, the policy sets forward-class 1 and selects the corresponding tunnel.
Configure ACLs with policy-based routing
Use this procedure to configure ACLs with PBR. The following steps provide a sample configuration and verification commands.