No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


NE40E-M2 V800R010C10SPC500 Configuration Guide - Interface and Data Link 01

This is NE40E-M2 V800R010C10SPC500 Configuration Guide - Interface and Data Link
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring MAC Accounting

Configuring MAC Accounting

If the MAC accounting function is enabled on an interface of a device, the device collects IPv4 or IPv6 traffic statistics corresponding to MAC addresses learned by the interface.

Usage Scenario

Figure 2-2 MAC accounting usage scenario

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.


  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The user interface view is displayed.

  3. Run mac accounting enable

    MAC accounting is enabled.

  4. Run commit

    The configuration is committed.

Checking the Configurations

After MAC accounting is enabled, run the display mac accounting command to check MAC accounting statistics on the interface or its sub-interfaces.

<HUAWEI> display mac accounting interface gigabitEthernet0/3/0.1
interface gigabitEthernet0/3/0 mac accounting data:

Port                       MAC address     Input frames     Input bytes     Output frames     Output bytes
gigabitEthernet0/3/0.1     e097-9649-9da1          29            3114             5645             399694
Total matching items displayed = 1

If you need to re-check MAC accounting statistics after a period, run the reset mac accounting command to delete the existing statistics and then run the display mac accounting command. This ensures statistics accuracy.

Updated: 2019-01-02

Document ID: EDOC1100058380

Views: 1860

Downloads: 15

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next