一、定义匹配数据流
# acl number 3000 rule 0 permit icmp source 111.111.111.2 0 destination 111.111.111.1 0 rule 5 permit icmp source 111.111.111.1 0 destination 111.111.111.2 0 #
二、配置流量统计
# traffic classifier acc operator and if-match acl 3000 # traffic behavior acc accounting packet # qos policy acc classifier acc behavior acc #
三、接口调用流通
# interface GigabitEthernet1/0/1 qos apply policy acc inbound qos apply policy acc outbound #
四、查看流量统计信息
[H3C]dis qos policy interface GigabitEthernet 1/0/1 Interface: GigabitEthernet1/0/1 Direction: Inbound Policy: acc Classifier: acc Operator: AND Rule(s) : If-match acl 3000 Behavior: acc Accounting enable: 0 (Packets) Interface: GigabitEthernet1/0/1 Direction: Outbound Policy: acc Classifier: acc Operator: AND Rule(s) : If-match acl 3000 Behavior: acc Accounting enable: 0 (Packets)