Configuring class-based accounting
Class-based accounting collects statistics (in number of packets or bytes) on a per-traffic class basis.
For example, you can define the action to collect statistics for traffic sourced from a certain IP
address. By analyzing the statistics, you can determine whether anomalies have occurred and what
action to take.
Configuration procedure
To configure class-based accounting:
Step
1.
Enter system view.
2.
Create a class and enter
class view.
3.
Configure match criteria.
4.
Return to system view.
5.
Create a behavior and
enter behavior view.
6.
Configure the accounting
action.
7.
Return to system view.
8.
Create a policy and enter
policy view.
9.
Associate the class with
the traffic behavior in the
QoS policy.
10. Return to system view.
11. Apply the QoS policy.
Displaying and maintaining class-based
accounting
To verify the class-based accounting configuration, use the display qos policy command in any
view to display the traffic statistics collected after the configuration is complete.
Command
system-view
traffic classifier classifier-name
[ operator { and | or } ]
if-match [ not ] match-criteria
quit
traffic behavior behavior-name
accounting
quit
qos policy policy-name
classifier classifier-name behavior
behavior-name
quit
•
Applying the QoS policy to an
interface or PVC
•
Applying the QoS policy to a VLAN
97
Remarks
N/A
N/A
N/A
N/A
N/A
Optional.
The router supports
packet-based accounting.
N/A
N/A
N/A
N/A
Choose one of the application
destinations as needed.