< Home

statistic enable (VLAN view)

Function

The statistic enable command enables the traffic statistics function in a VLAN.

The undo statistic enable command disables the traffic statistics function in a VLAN.

By default, the traffic statistics function is disabled in a VLAN.

Format

statistic enable

undo statistic enable

Parameters

None

Views

VLAN view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To check the network status or locate network faults, you can use the statistic enable command to enable the traffic statistics function in a VLAN.

After the traffic statistics function is enabled in a VLAN, the device collects statistics on unicast packets, broadcast packets, and broadcast packets transmitted in the VLAN.

Precautions

  • On different models, the number of VLANs where the traffic statistics function can be configured is different:
    • S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S: 256
    • S5720I-SI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI: 64
    • Other models: 16
  • Traffic statistics are accumulative and cannot be cleared by the system. To clear traffic statistics in a VLAN, run the reset vlan statistics command in the VLAN.

  • The traffic statistics function occupies system resources. If system resources are insufficient, the configuration may fail. Disable this function when traffic statistics do not need to be collected.

  • After enabling the traffic statistics function in a VLAN, you can use the display vlan vlan-id statistics command to view traffic statistics in the VLAN.

  • On the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, if the traffic policy is bound to the traffic behavior containing traffic statistics and is applied to an interface in the inbound direction, and the statistic enable command is enabled in the VLAN that the interface joins, the statistic enable command cannot collect statistics on packets in the inbound direction of the interface.

Example

# Enable the traffic statistics function in VLAN 100.

<HUAWEI> system-view
[HUAWEI] vlan 100
[HUAWEI-vlan100] statistic enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >