Configuration Notes and Constraints

When configuring PBR, consider the following points:

At least one of destination-ipv4, source-ipv4, destination-ipv6, source-ipv6 need to be configured

Commit failed.

admin@PICOS# set routing pbr map PBR_map1 sequence 10 match source-ipv4 0.0.0.0/32

admin@PICOS# set routing pbr map PBR_map1 sequence 10 match destination-ipv4 1.1.1.0/24

admin@PICOS# set routing pbr map PBR_map1 sequence 10 action dscp 40

Configuring Policy-Based Routing

Follow the configuration roadmap below to complete the deployment of Policy-Based Routing:

1. Configure PBR match rule.

Policies in PBR include match rule, which are conditions that incoming packets must meet in order to be subjected to the policy. Match rules include attributes such as source/destination IP address, source/destination port, and DSCP value.

2. Configure PBR action.

Once a packet matches the specified rule in a policy, an action is taken based on the policy configuration. This action could involve routing the packet through a specific next-hop router, changing Quality of Service (QoS) policies such as DSCP value.

3. Configure applying interface for the PBR policy.

Applying this policy to the VLAN interface where the traffic is coming in.

Procedure

Step 1          Enable IP routing for L3 forwarding.

set ip routing enable true

Step 2          Configure the match rule for PBR traffic classification.

set routing pbr map <map-name> sequence <sequence-number> match destination-ipv4 <ipv4-address/prefix-length>

set routing pbr map <map-name> sequence <sequence-number> match source-ipv4 <ipv4-address/prefix-length>

set routing pbr map <map-name> sequence <sequence-number> match destination-port <destination-port>

set routing pbr map <map-name> sequence <sequence-number> match source-port <source-port>

set routing pbr map <map-name> sequence <sequence-number> match dscp <dscp-value>

set routing pbr map <map-name> sequence <sequence-number> match destination-ipv6 <ipv6-address/prefix-length>

set routing pbr map <map-name> sequence <sequence-number> match source-ipv6 <ipv6-address/prefix-length>

Step 3          Configure an action to redirect packets to a next-hop IPv4/IPv6 address for policy-based routing.

set routing pbr map <map-name> sequence <sequence-number> action nexthop <ip-address> [nexthop-vrf  <vrf-name>]

Step 4          Configure an action to modify the DSCP value in packets for policy-based routing.

set routing pbr map <map-name> sequence <sequence-number> action dscp <dscp-value>

Step 5          Apply the PBR policy to the VLAN interface where the traffic is coming in.

set routing pbr map <map-name> vlan-interface <vlan-interface>

Step 6          Commit the configuration.

commit

Step 7          View the configuration information of policy-based routing.

run show pbr map [<map-name>]