< Home

display traffic-statistics

Function

The display traffic-statistics command displays ACL-based traffic statistics.

Format

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

Parameters

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.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.
If interface-type interface-number is not specified, ACL-based traffic statistics on all interfaces are displayed.

-

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.
  • bas-acl specifies a basic ACL.
  • adv-acl specifies an advanced ACL.
  • user-acl specifies a user-defined ACL.
The value is an integer. The value ranges are as follows:
  • The value of bas-acl ranges from 2000 to 2999.
  • The value of adv-acl ranges from 3000 to 3999.
  • The value of user-acl ranges from 5000 to 5999.

acl { acl-name | l2-acl }

Displays traffic statistics on packets matching a specified ACL.
  • acl-name specifies the name of an ACL.
  • l2-acl specifies the number of a Layer 2 ACL.
  • The value of acl-name must be the name of an existing ACL.
  • The value of l2-acl is an integer that ranges from 4000 to 4999.

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.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

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.

Example

# 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
Table 1 Description of the display traffic-statistics command output

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.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >