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.
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.
The system view is displayed.
The user interface view is displayed.
MAC accounting is enabled.
The configuration is committed.
After MAC accounting is enabled, run the display mac accounting command to check MAC accounting statistics on the interface or its sub-interfaces.
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.