Figure 1 outlines the CoPP configuration process in the following steps:
- Configure traffic classification: Define a group of matching rules to classify traffic which is the basis for differentiated services.
- Configure queue mapping: Configure a forwarding class and local priority for sending different types of packets to a specified CPU queue.
- Configure scheduling: Select a queue and process the packets from the queue with WRR scheduling algorithm and configure a queue scheduler weight.
- Configure queue shaping: Set minimum bandwidth and maximum bandwidth for each CPU queue.
Figure 1 CoPP Configuration Process
Step1 Configure CoPP firewall filter rule for traffic classification.
set firewall filter copp sequence <number> from destination-mac-address <mac-address>
Step2 Configure queue mapping of CoPP policy.
set firewall filter copp sequence <number> then forwarding-class <forwarding-class name>
Step3 Configure mapping between forwarding class and local priority.
set class-of-service forwarding-class <forwarding-class-name> local-priority <int>
Step4 Configure queue scheduler weight.
set class-of-service scheduler <scheduler-name> weight <value>
It is NOT recommended to use the weight value for CPU queue scheduling due to hardware restrictions.
Step5 Configure WRR scheduling algorithm for queue scheduling.
set class-of-service scheduler <scheduler-name> mode WRR
Step6 Configure max bandwidth and min bandwidth for queue shaping.
set class-of-service scheduler <scheduler-name> max-bandwidth-pps <value>
set class-of-service scheduler <scheduler-name> min-bandwidth-pps <value>
The total value of min-bandwidth-pps of all activated queues should be less than the CPU-affordable PPS depending on different platforms, which should be the maximum PPS threshold to the CPU.
Step7 Configure the DSCP remark for COPP.
set firewall filter copp sequence <number> then dscp <dscp-value>
Step8 Configure CoPP scheduler profile.
set class-of-service scheduler-profile copp-profile forwarding-class <forwarding-class-name> scheduler <scheduler-name>