statistics enable vlan

Function

The statistics enable vlan command enables the packet statistics function on an interface or in a VLAN.

The undo statistics enable vlan command disables the packet statistics function on an interface or in a VLAN.

By default, packet statistics collection is disabled on an interface or in a VLAN.

Format

statistics enable vlan { vlan-id1 [ to vlan-id2 ] }

undo statistics enable vlan { vlan-id1 [ to vlan-id2 ] }

Parameters

Parameter Description Value
vlan-id1

Specifies the start VLAN ID.

The value is an integer ranging from 1 to 4094.

vlan-id2

Specifies the end VLAN ID.

The value is an integer ranging from 1 to 4094.

Views

Layer 2 100GE interface view, Layer 2 10GE interface view, 25GE-L2 view, 400GE-L2 view, Layer 2 40GE interface view, Layer 2 50GE interface view, Eth-Trunk interface view, Layer 2 GE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
vlan write

Usage Guidelines

Usage Scenario

An interface can be added to multiple VLANs. To view packet statistics on a specified interface in a specified VLAN, run the statistic enable command to enable packet statistics collection on the interface and in the VLAN. Otherwise, you cannot view packet statistics on a specified interface in a specified VLAN.

Follow-up Procedure

Run the display statistics vlan command to view VLAN packet statistics on a specified interface. The command output helps you analyze faults.

Example

# Enable packet statistics collection on GE 0/1/1 and in VLAN 10.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[*HUAWEI-GigabitEthernet0/1/1] portswich
[*HUAWEI-GigabitEthernet0/1/1] quit
[*HUAWEI] vlan 10
[*HUAWEI-vlan10] port GigabitEthernet 0/1/1
[*HUAWEI-vlan10] quit
[*HUAWEI] interface GigabitEthernet0/1/1
[*HUAWEI-GigabitEthernet0/1/1] statistics enable vlan 10
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >