mac accounting enable

Function

The mac accounting enable command enables the MAC accounting function.

The undo mac accounting enable command disables the MAC accounting function.

By default, the MAC accounting function is disabled.

Format

mac accounting enable

undo mac accounting enable

Parameters

None

Views

100GE interface view, 10GE interface view, 25GE interface view, 40GE interface view, 50GE interface view, Eth-Trunk interface view, FlexE interface view, GE interface view, XGE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
forwarding write

Usage Guidelines

Usage Scenario

To collect MAC address-based traffic statistics on a physical interface, its sub-interfaces, an Eth-Trunk interface, or Eth-Trunk sub-interfaces, run the mac accounting enable command on the physical interface or Eth-Trunk interface to enable the MAC accounting function. This configuration allows a device to collect service traffic statistics based on an interface and its MAC address.

NOTE:

This command can be run only on a main interface and takes effect on the interface and its sub-interfaces.

MAC accounting can be used in either of the following scenarios:

  • When a Huawei device on an ISP network functions as an Internet exchange point (IXP), the networks connected to the IXP are provided by other carriers. When the ISP leases the other carriers' networks, for example, Network1 and Network2, they charge the ISP by traffic volume. To check traffic of MAC addresses, run the mac accounting enable command to enable the MAC accounting function on the IXP's interface, so that traffic of the peer routers can be obtained. This facilitates the ISP to verify or analyze traffic.
  • If the IXP is under DDoS attacks, the MAC accounting function helps the ISP to check the traffic of peer routers with specified MAC addresses. If traffic of a specified MAC address is huge, the attack traffic may be from this device with the specified MAC address.

Example

# Enable the MAC accounting function on GE 0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1
[~HUAWEI-GigabitEthernet0/1/1] mac accounting enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >