display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] inbound [ acl { bas-acl | adv-acl } [ rule rule-id ] ] [ secure ]
display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] inbound acl user-acl [ rule rule-id ]
display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] outbound [ acl { bas-acl | adv-acl | user-acl } [ rule rule-id ] ]
display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] inbound [ acl { acl-name | l2-acl } [ rule rule-id ] [ acl { bas-acl | adv-acl | acl-name } [ rule rule-id ] ] ] [ secure ]
display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] outbound [ acl { acl-name | l2-acl } [ rule rule-id ] [ acl { bas-acl | adv-acl | acl-name } [ rule rule-id ] ] ]
display traffic-statistics interface inbound [ secure ]
display traffic-statistics interface outbound
display traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] { inbound | outbound } [ acl ipv6 { bas-acl | adv-acl | acl-name } [ rule rule-id ] ]
Parameter |
Description |
Value |
---|---|---|
vlan vlan-id |
Displays ACL-based traffic statistics in a specified VLAN. |
The value is an integer that ranges from 1 to 4094. |
interface interface-type interface-number |
Displays ACL-based traffic statistics on a specified interface.
|
- |
inbound |
Displays ACL-based traffic statistics in the inbound direction. |
- |
outbound |
Displays ACL-based traffic statistics in the outbound direction. |
- |
acl { bas-acl | adv-acl | user-acl } |
Displays traffic statistics on packets matching a specified ACL.
|
The value is an integer. The value ranges are as follows:
|
acl { acl-name | l2-acl } |
Displays traffic statistics on packets matching a specified ACL.
|
|
acl ipv6 |
Displays traffic statistics based on the IPv6 ACL. |
- |
rule rule-id |
Displays traffic statistics on packets matching a specified ACL rule. |
The value is an integer that ranges from 0 to 4294967294. |
secure |
Displays traffic statistics on packets based on packet filtering policies configured through the traffic-secure (interface view) or traffic-secure (system view) command. |
- |
Usage Scenario
The display traffic-statistics command displays ACL-based traffic statistics on an interface or in a VLAN. The command output helps you learn about forwarded and discarded packets matching the ACL and locate faults.
Prerequisites
The traffic statistics function has been enabled using the traffic-statistic (interface view) or traffic-statistic (system view) command.
Precautions
Before running the display traffic-statistics command to display traffic statistics on packets based on packet filtering policies configured through the traffic-secure (interface view) command, you must specify the secure parameter in the traffic-statistic (interface view) command.
Before running the display traffic-statistics command to display traffic statistics on packets based on packet filtering policies configured through the traffic-secure (system view) command, you must specify the secure parameter in the traffic-statistic (system view) command.
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, if traffic policing and traffic statistics collection based on the same ACL are configured, only statistics on the number of packets matching an ACL, namely, value of matched in the display traffic-statistics command output, are correct.
# Display statistics on packets matching ACL 3009 in the inbound direction on GE0/0/1.
<HUAWEI> system-view [HUAWEI] acl 3009 [HUAWEI-acl-adv-3009] rule 1 permit ip [HUAWEI-acl-adv-3009] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] traffic-statistic inbound acl 3009 [HUAWEI-GigabitEthernet0/0/1] quit [HUAWEI] display traffic-statistics interface gigabitethernet 0/0/1 inbound acl 3009 --------------------------------------------------------------------------- Interface GigabitEthernet0/0/1 ACL:3009 Rule:1 matched:0 packets, passed:0 packets, dropped:0 packets
Item |
Description |
---|---|
ACL |
ACL number. |
Rule |
ACL rule ID. |
matched |
Number of packets matching the ACL. |
passed |
Number of forwarded packets. |
dropped |
Number of discarded packets. |