Search This Blog

Wednesday, July 20, 2016

HPE/Cisco Policy-based route


Here is an example of Cisco PBR:

ip access-list extended ACL_NET192
deny ip host 192.168.10.1 172.16.0.0 0.0.0.255
deny ip host 192.168.11.0 0.0.0.255 172.16.0.0 0.0.0.255
permit ip host 192.168.10.1 any
permit ip host 192.168.10.2 any
deny ip any any
!
route-map PBR_NET192 permit 10
 match ip address ACL_NET192
 set ip next-hop 1.1.1.1
!
interface Vlan192
 ip policy route-map PBR_NET192
!

This is an example of the same PBR on HPE Comware:

acl number 3001
rule 10 permit ip source 192.168.10.1 0 destination 172.16.0.0 0.0.0.255
rule 20 permit ip source 192.168.11.0 0.0.0.255 destination 172.16.0.0 0.0.0.255
#
acl number 3002
rule 10 permit ip source 192.168.10.1 0 destintion any
rule 20 permit ip source 192.168.11.0 0.0.0.255 destintion any
quit
#
policy-based-route PBR_NET192 deny node 5
if-match acl 3001
quit
#
policy-based-route PBR_NET192 permit node 10
if-match acl 3002
apply next-hop 1.1.1.1
quit
#
interface vlan 192
ip policy-based-route PBR_NET192
quit
#

Tested on HP Comware v7.1.045 R2418P01 / HP 5900AF-48XG-4QSFP+

No comments:

Post a Comment