Configuring class-based accounting, Overview, Configuration procedure – H3C Technologies H3C S12500 Series Switches User Manual

Page 80: Displaying and maintaining class-based accounting

Advertising
background image

71

Configuring class-based accounting

Overview

Class-based accounting collects statistics (in 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

Step Command

Remarks

1.

Enter system view.

system-view N/A

2.

Create a class and enter

class view.

traffic classifier tcl-name [ operator { and
| or } ]

N/A

3.

Configure match criteria.

if-match 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 { byte | packet }

Optional.

byte: Counts traffic in bytes.

packet: Counts traffic in

packets.

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 tcl-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

Applying the QoS policy to a VLAN

Applying the QoS policy globally

Choose one application
destination 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.

Advertising