How to configure policy route on S switch?

For example: we will redirect the traffic will will enter GE2/0/1,the source ip is 192.168.100.0/24, the nexthop will be redirected to 10.1.20.1,the source ip is 192.168.101.0/24, the nexthop will be redirected to 10.1.30.1�?working flow�?1. Configure acl to match the traffic which need be redirected.
[Switch] acl 3001
[Switch-acl-adv-3001] rule permit ip source 192.168.100.0 0.0.0.255
[Switch-acl-adv-3001] quit
[Switch] acl 3002
[Switch-acl-adv-3002] rule permit ip source 192.168.101.0 0.0.0.255
[Switch-acl-adv-3002] quit
2. Configure traffic classification.
[Switch] traffic classifier c1 operator or
[Switch-classifier-c1] if-match acl 3001
[Switch-classifier-c1] quit
[Switch] traffic classifier c2 operator or
[Switch-classifier-c2] if-match acl 3002
[Switch-classifier-c2] quit
3. Configure traffic behavior.
[Switch] traffic behavior b1
[Switch-behavior-b1] redirect ip-nexthop 10.1.20.1
[Switch-behavior-b1] quit
[Switch] traffic behavior b2
[Switch-behavior-b2] redirect ip-nexthop 10.1.30.1
[Switch-behavior-b2] quit
4. Configure traffic policy.
[Switch] traffic policy p1
[Switch-trafficpolicy-p1] classifier c1 behavior b1
[Switch-trafficpolicy-p1] classifier c2 behavior b2
[Switch-trafficpolicy-p1] quit
5. Apply the traffic policy on the interface.
[Switch] interface gigabitethernet 2/0/1
[Switch-GigabitEthernet2/0/1] traffic-policy p1 inbound
[Switch-GigabitEthernet2/0/1] return

Notes�?we can configure multiple classifier and behavior in one policy.

Scroll to top