97
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 Command Remarks
1.
Enter system view.
system-view
N/A
2.
Create a class and enter
class view.
traffic classifier
classifier-name
[
operator
{
and
|
or
} ]
N/A
3.
Configure match criteria.
if-match
[
not
]
match-criteria
N/A
4.
Return to system view.
quit
N/A
5.
Create a behavior and
enter behavior view.
traffic behavior
behavior-name
N/A
6.
Configure the accounting
action.
accounting
Optional.
The router supports
packet-based accounting.
7.
Return to system view.
quit
N/A
8.
Create a policy and enter
policy view.
qos policy
policy-name
N/A
9.
Associate the class with
the traffic behavior in the
QoS policy.
classifier
classifier-name
behavior
behavior-name
N/A
10.
Return to system view.
quit
N/A
11.
Apply the QoS policy.
•
Applying the QoS policy to an
interface or PVC
•
Applying the QoS policy to a VLAN
Choose one of the application
destinations as needed.
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.