subinterface traffic-statistics enable (system view)

Function

The subinterface traffic-statistics enable command enables the traffic statistics function on sub-interfaces.

The undo subinterface traffic-statistics enable command disables the traffic statistics function on sub-interfaces.

By default, the traffic statistics function is disabled on a sub-interface.

Format

subinterface traffic-statistics enable

undo subinterface traffic-statistics enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
interface-mgr write

Usage Guidelines

Usage Scenario

By default, the traffic statistics collection function is disabled on Ethernet sub-interfaces. Before checking statistics about sent or received packets on an Ethernet sub-interface, run the statistic enable command in the Ethernet sub-interface view to enable the traffic statistics collection function.

Prerequisites

An Ethernet interface has been specified and sub-interfaces have been configured for the Ethernet interface.

Configuration Impact

If the subinterface traffic-statistics enable command is run in the system view, the traffic statistics collection function is enabled on all sub-interface of the device.

Follow-up Procedure

After the rate statistics collection function is enabled on all the sub-interfaces of an Ethernet interface on a device, the device periodically refreshes rate statistics on the sub-interfaces. The display interface command can be used to view rate statistics.

Precautions

Enabling the traffic statistics collection function may consume a lot of system resources. Exercise caution when using the subinterface traffic-statistics enable command.

Running the undo subinterface traffic-statistics enable command in the system view disables traffic statistics collection on all sub-interfaces, whereas running the undo subinterface traffic-statistics enable command in the interface view disables traffic statistics collection of only the sub-interfaces on the interface.

This command does not take effect on EVC sub-interfaces.

Example

# Enable the traffic statistics function on all the sub-interfaces on a device.
<HUAWEI> system-view
[~HUAWEI] subinterface traffic-statistics enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >