Answer the question
In order to leave comments, you need to log in
How to implement PBR on an HP switch?
There is an HP A5500-24G-SFP EI switch.
Previously, I did not encounter the routing functionality of H3C switches. Therefore, I want to ask the community for help, maybe someone has come across and can help.
In total, there is a task from selected VLANs to route traffic through a router other than the default gateway.
acl created:
acl number 3002
rule 10 permit ip source 10.10.254.0 0.0.0.255 logging
policy-based-route test-pbr-new permit node 2
if-match acl 3002
apply ip-address next-hop 10.10.253.2 direct
acl number 3003
rule 3 permit ip destination 10.10.0.0 0.0.255.255
rule 4 permit ip destination 192.168.0.0 0.0.255.255
policy-based-route test-pbr-new permit node 1
if-match acl 3003
policy-based-route test-pbr-new permit node 2
if-match acl 3002
apply ip-address next-hop 10.10.253.2 direct
tracert -d 10.10.108.128
Tracing route to 10.10.108.128 over a maximum of 30 hops
1 * 1 ms 1 ms 10.10.254.1
2 1 ms 1 ms 1 ms 10.10.253.1
3 <1 ms <1 ms <1 ms 10.10.108.128
Trace complete.
#
version 5.20, Release 2208P01
#
sysname HP Optical Switch
#
clock timezone #Web#4#02 add 04:00:00
#
super password level 3 simple <pass>
#
dhcp relay server-group 1 ip 192.168.1.1
dhcp relay server-group 1 ip 192.168.2.1
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
#
domain default enable system
#
telnet server enable
#
ip ttl-expires enable
#
ip http acl 2001
#
acl number 3002
rule 10 permit ip source 10.10.254.0 0.0.0.255 logging
acl number 3003
rule 3 permit ip destination 10.10.0.0 0.0.255.255
rule 4 permit ip destination 192.168.0.0 0.0.255.255
#
vlan 1
#
.....
#
vlan 253
#
vlan 254
description Test-VLAN
#
radius scheme system
primary authentication 127.0.0.1 1645
primary accounting 127.0.0.1 1646
user-name-format without-domain
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
user-group system
#
local-user admin
password cipher <pass>
authorization-attribute level 3
service-type ssh telnet terminal
local-user sys
password simple <pass>
authorization-attribute level 3
service-type ssh telnet terminal
service-type portal
#
interface NULL0
#
interface Vlan-interface1
ip address 192.168.5.1 255.255.0.0
#
.......
#
interface Vlan-interface253
ip address 10.10.253.1 255.255.255.0
#
interface Vlan-interface254
ip address 10.10.254.1 255.255.255.0
ip policy-based-route test-pbr-new
#
.....
#
interface GigabitEthernet1/0/12
port link-mode bridge
port link-type hybrid
port hybrid vlan 254 tagged
port hybrid vlan 1 untagged
#
interface GigabitEthernet1/0/32
port link-mode bridge
port link-type hybrid
port hybrid vlan 253 tagged
port hybrid vlan 1 untagged
#
policy-based-route test-pbr-new permit node 1
if-match acl 3003
policy-based-route test-pbr-new permit node 2
if-match acl 3002
apply ip-address next-hop 10.10.253.2
#
ip route-static 0.0.0.0 0.0.0.0 10.10.100.100 track 2
ip route-static 0.0.0.0 0.0.0.0 10.10.100.101 preference 70
#
snmp-agent
snmp-agent local-engineid <id>
snmp-agent community read public
snmp-agent sys-info location Left rack
snmp-agent sys-info version v2c v3
#
dhcp enable
#
ntp-service unicast-server 192.168.6.1
#
ssh server enable
#
undo arp check enable
#
load xml-configuration
#
user-interface aux 0
user-interface vty 0
acl 2001 inbound
authentication-mode scheme
user-interface vty 1 5
acl 2001 inbound
authentication-mode scheme
user privilege level 3
set authentication password simple <pass>
user-interface vty 6 15
acl 2001 inbound
authentication-mode scheme
#
return
Answer the question
In order to leave comments, you need to log in
Not very strong in HP, but it seems to me that I need to fix ACL 3002 by prohibiting access to neighboring VLANs:
acl number 3002
rule 1 deny ip destination 10.10.0.0 0.0.255.255
rule 2 deny ip destination 192.168.0.0 0.0.255.255
rule 10 permit ip source 10.10.254.0 0.0.0.255 logging
policy-based-route test-pbr-new permit node 2
if-match acl 3002
apply ip-address next-hop 10.10.253.2 direct
In general, after a long time I had to return to this issue.
In case anyone runs into a similar problem:
policy-based-route test-pbr-new permit node 1
if-match acl 3003
policy-based-route test-pbr-new permit node 2
if-match acl 3002
apply ip-address next-hop 10.10.253.2
Advanced ACL 3002, named -none-, 2 rules,
ACL's step is 5
rule 10 permit ip source 10.10.254.0 0.0.0.255 destination 10.10.0.0 0.0.255.255 (72 times matched)
rule 20 permit ip source 10.10.254.0 0.0.0.255 destination 192.168.0.0 0.0.255.255
Advanced ACL 3003, named -none-, 1 rule,
ACL's step is 5
rule 10 permit ip source 10.10.254.0 0.0.0.127 (6 times matched)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question