1-22
Table 1-25
Generate traffic statistics on packets passing a port and matching specific ACL rules
Operation
Command
Description
Enter system view
system-view
—
Enter Ethernet port view
interface
interface-type
interface-number
—
Generate the statistics on the packets
matching specific ACL rules
traffic-statistic
inbound
acl-rule
Required
Clear the statistics on the packets matching
specific ACL rules
reset traffic-statistic
inbound
acl-rule
Optional
The traffic accounting function configured on a VLAN is only applicable to packets tagged with 802.1Q
header.
Configuration example
z
Ethernet 1/0/1 is connected to the 10.1.1.0/24 network segment.
z
Generate statistics on the packets sourced from the 10.1.1.0/24 network segment.
z
Clear the statistics.
1) Method I: configure traffic accounting for port Ethernet 1/0/1
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 10.1.1.1 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] traffic-statistic inbound ip-group 2000
[Sysname-Ethernet1/0/1] reset traffic-statistic inbound ip-group 2000
2) Method II: configure traffic accounting for VLAN 2
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 10.1.1.1 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] traffic-statistic vlan 2 inbound ip-group 2000
[Sysname] reset traffic-statistic vlan 2 inbound ip-group 2000
Enabling the Burst Function
Refer to section
Burst
for information about the burst function.
Configuration prerequisites
The burst function is required.