Advanced Traffic Management Guide K/KA/KB.15.15
the next action is tried, and so on, until an interface null or the end of the list of configured
actions is encountered. If the end of the list is reached, the policy action for that class behaves
as if no PBR policy is applied.
• The maximum combined number of unique IP next-hops and default-next-hops supported is
256.
Example 222 TCP and UDP traffic routing
The following example shows TCP and UDP traffic routed on different network paths. First, the
traffic classes are created, then the PBR policy is created, and lastly the PBR policy is applied to
an interface.
HP Switch(config)#: class ipv4 TCP
HP Switch(config-class)#: match tcp 10.0.8.1/24 15.29.16.104/24 eq 80
HP Switch(config-class)#: match tcp 10.0.8.1/24 15.29.16.104/24 eq 22
HP Switch(config-class)#: match tcp 10.0.8.1/24 15.29.16.104/24 eq 23
HP Switch(config-class)#: exit
HP Switch(config)#: class ipv4 UDP
HP Switch(config-class)#: match udp 10.0.8.1/24 15.29.16.104/24 eq 80
HP Switch(config-class)#: match udp 10.0.8.1/24 15.29.16.104/24 eq 22
HP Switch(config-class)#: match upd 10.0.8.1/24 15.29.16.104/24 eq 23
HP Switch(config-class)#: exit
HP Switch(config)#: class ipv6 TCP
HP Switch(config-class)#: match tcp 2001::1/64 3001::1/64 eq 80
HP Switch(config-class)#: match tcp 2001::1/64 3001::1/64 eq 22
HP Switch(config-class)#: match tcp 2001::1/64 3001::1/64 eq 23
HP Switch(config-class)#: exit
HP Switch(config)#: class ipv6 UDP
HP Switch(config-class)#: match udp 2001::1/64 3001::1/64 eq 80
HP Switch(config-class)#: match udp 2001::1/64 3001::1/64 eq 22
HP Switch(config-class)#: match udp 2001::1/64 3001::1/64 eq 23
HP Switch(config-class)#: exit
HP Switch(config)#: policy pbr TCP_UDP
HP Switch(policy-pbr)#: class ipv4 TCP
HP Switch(policy-pbr-class)#: action ip next-hop 20.0.0.1
HP Switch(policy-pbr-class)#: action interface null
HP Switch(policy-pbr-class)#: exit
HP Switch(policy-pbr)#: class ipv4 UDP
HP Switch(policy-pbr-class)#: action ip default-next-hop 30.0.0.1
HP Switch(policy-pbr-class)#: action interface tunnel 3
HP Switch(policy-pbr-class)#: exit
HP Switch(policy-pbr)#: class ipv6 TCP
HP Switch(policy-pbr-class)#: action ip next-hop 20.0.0.1
HP Switch(policy-pbr-class)#: exit
HP Switch(policy-pbr)#: class ipv6 UDP
HP Switch(policy-pbr-class)#: action ip next-hop 30.0.0.1
HP Switch(policy-pbr-class)#: exit
HP Switch(policy-pbr)#: exit
HP Switch(config)#: vlan 10
HP Switch(vlan-10)#: service-policy TCP_UDP in
Troubleshooting PBR
Use the show statistics policy command to display information about which PBR action
for an applied policy is active. Hit counts for each entry in the class and policy with the active
action are displayed.
HP Switch(vlan-111)#: show statistics policy TCP_UDP vlan 111 in
HitCounts for Policy TCP_UDP
Total
100 class ipv4 TCP action
( 5 ) 10 match tcp 10.0.8.1 0.0.0.255 15.29.16.104 0.0.0.255 eq 80
( 2 ) 20 match tcp 10.0.8.1 0.0.0.255 15.29.16.104 0.0.0.255 eq 22
Creating a PBR policy 359










