PLANET XGS3-24040 User Manual
Page 165

Chapter 18 PBR Configuration
18-2
Switch(config)#policy-map p1
Switch(Config-PolicyMap-p1)#class c1
Switch(Config-PolicyMap-p1-Class-c1)#set ip nexthop 218.31.1.119
Switch(Config-PolicyMap-p1-Class-c1)#exit
Switch(Config-PolicyMap-p1)#exit
Switch(config)#interface ethernet 1/1
Switch(Config-If-Ethernet1/1)#service-policy input p1
Configuration results:
First set an ACL a1 with two items. The first item matches source IP segments 192.168.1.0/24(allowed). The
second item matches source IP segments 192.168.1.0/24 and destination IP segments 192.168.0.0/16
(rejected). Turn on QoS function in global mode and create a class-map: c1 in which matches ACL a1, and
create a policy-map in which quote c1. Set the next-hop IP as 218.31.1.119 and apply the policy-map at port
ethernet1/1. After that, all messages on port ethernet 1/1 from segment 192.168.1.0/24 will be transmitted
through 218.31.1.119 except those from 192.168.0.0/16 segment which are still be transmitted through
normal L3 routing.