To do...
Enter system view
Enter port group view
Collect statistics about ACL
matching packets
Clear statistics about ACL
matching packets
4)
Configuring traffic accounting for a port
Follow these steps to collect/clear statistics about incoming ACL matching packets on a port:
To do...
Enter system view
Enter Ethernet port view
Collect statistics about
incoming ACL matching
packets
Clear statistics about
incoming ACL matching
packets
User-defined traffic classification rules configured for traffic accounting in the global scope or for a
VLAN take precedence over the default rules used for processing protocol packets. The device will
collect traffic statistics preferentially, which may affect device management implemented through Telnet
and so on.
Configuration examples
# Collect and then clear the statistics about the incoming packets sourced from network segment
10.1.1.0/24 (assume that GigabitEthernet 1/0/1 is connected to network segment 10.1.1.0/24 and
carries VLAN 2).
1)
Method I
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 10.1.1.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] traffic-statistic inbound ip-group 2000
[Sysname-GigabitEthernet1/0/1] reset traffic-statistic inbound ip-group 2000
2)
Method II
Use the command...
system-view
port-group group-id
traffic-statistic inbound acl-rule
reset traffic-statistic inbound
acl-rule
Use the command...
system-view
interface interface-type
interface-number
traffic-statistic inbound acl-rule
reset traffic-statistic inbound acl-rule
1-23
Remarks
—
—
Required
By default, traffic
accounting is disabled.
Optional
Remarks
—
—
Required
Optional