< Home

reset traffic-statistics

Function

The reset traffic-statistics command clears ACL-based traffic statistics.

Format

reset traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] inbound [ acl { bas-acl | adv-acl } [ rule rule-id ] ] [ secure ]

reset traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] inbound acl user-acl [ rule rule-id ]

reset traffic-statistics [ vlan vlan-id | interface interface-type interface-number ] outbound [ acl { bas-acl | adv-acl | user-acl } [ rule rule-id ] ]

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

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

reset traffic-statistics { interface | vlan } inbound [ secure ]

reset traffic-statistics { interface | vlan } outbound

reset 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

Clears ACL-based traffic statistics in a specified VLAN.

The value is an integer that ranges from 1 to 4094.

interface interface-type interface-number

Clears 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 cleared.

-

inbound

Clears ACL-based traffic statistics in the inbound direction.

-

outbound

Clears ACL-based traffic statistics in the outbound direction.

-

acl { bas-acl | adv-acl | user-acl }

Clears 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 }

Clears 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

Clears traffic statistics based on the IPv6 ACL.

-

rule rule-id

Clears traffic statistics on packets matching a specified ACL rule.

The value is an integer that ranges from 0 to 4294967294.

secure

Clears traffic statistics on packets based on packet filtering policies configured through the traffic-secure (interface view) or traffic-secure (system view) command.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before re-collecting ACL-based traffic statistics, run the reset traffic-statistics command to clear existing statistics. Then run the display traffic-statistics command to view ACL-based traffic statistics.

Precautions

After the reset traffic-statistics command is executed, statistics are cleared and cannot be restored. Exercise caution when you use this command.

Example

# Clear statistics about incoming packets that match rule 5 in the ACL named test on GE0/0/1.

<HUAWEI> reset traffic-statistics interface gigabitethernet 0/0/1 inbound acl test rule 5
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >