62Configuring class-based accountingClass-based accounting collects statistics (in packets) on a per-traffic class basis. For example, you candefine the action to collect statistics for traffic sourced from a certain IP address. By analyzing thestatistics, you can determine whether anomalies have occurred and what action to take.Configuration procedureTo configure class-based accounting:Step Command Remarks1. Enter system view. system-view N/A2. Create a class and enterclass view.traffic classifier tcl-name [ operator { and| or } ] N/A3. Configure match criteria. if-match match-criteria N/A4. Return to system view. quit N/A5. Create a behavior andenter behavior view. traffic behavior behavior-name N/A6. Configure the accountingaction. accounting N/A7. Return to system view. quit N/A8. Create a policy and enterpolicy view. qos policy policy-name N/A9. Associate the class with thetraffic behavior in the QoSpolicy.classifier tcl-name behaviorbehavior-name N/A10. Return to system view. quit N/A11. Apply the QoS policy.• Applying the QoS policy to aninterface• Applying the QoS policy to a VLAN• Applying the QoS policy globally• Applying the QoS policy to the controlplaneChoose one applicationdestination as needed.Displaying and maintaining traffic accountingYou can verify the configuration with the display qos policy global, display qos policy interface, ordisplay qos vlan-policy command depending on the occasion where the QoS policy is applied.