display mac accounting

Function

The display mac accounting command displays the MAC accounting statistics of an interface.

Format

display mac accounting interface interfacename [ mac mac-address ]

Parameters

Parameter Description Value
mac mac-address

Displays statistics about a specified MAC address.

If no MAC address is specified, statistics about all MAC addresses is displayed.

The value is a 12-digit hexadecimal number, in the format of H-H-H. Each H is 4 digits. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is displayed as 00e0.

interface interfacename

Specifies an interface.

-

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
forwarding read

Usage Guidelines

Usage Scenario

After MAC accounting is deployed on an interface, run the display mac accounting command to check service traffic statistics corresponding to MAC addresses learned by the interface. The statistics help determine whether the device is working properly.

NOTE:

If an interface is specified, MAC accounting statistics on the interface and its sub-interfaces are both displayed. If a sub-interface is specified, only MAC accounting statistics on the sub-interface are displayed.

Example

The actual command output varies according to the device. The command output here is only an example.

# Display MAC accounting statistics of the interface with a specified MAC address.
<HUAWEI> display mac accounting interface gigabitEthernet 0/1/16 mac-address 00e0-fc12-3456
interface gigabitEthernet0/1/16 mac accounting data:

---------------------------------------------------------------------------------------------------------------
Port                       MAC address     Input frames     Input bytes     Output frames     Output bytes
gigabitEthernet0/1/16     00e0-fc12-3456          12           17380             1                    10
----------------------------------------------------------------------------------------------------------------
Total matching items displayed = 1
# Display the MAC accounting statistics of an interface.
<HUAWEI> display mac accounting interface gigabitEthernet 0/1/16
interface gigabitEthernet0/1/16 mac accounting data:

---------------------------------------------------------------------------------------------------------------
Port                       MAC address     Input frames     Input bytes     Output frames     Output bytes
gigabitEthernet0/1/16     00e0-fc12-3456          12           17380             1                    10
gigabitEthernet0/1/16.1     00e0-fc12-3457          29            3114             5645             399694
----------------------------------------------------------------------------------------------------------------
Total matching items displayed = 2
<HUAWEI> display mac accounting interface gigabitEthernet0/1/16.1
interface gigabitEthernet0/1/16 mac accounting data:

---------------------------------------------------------------------------------------------------------------
Port                       MAC address     Input frames     Input bytes     Output frames     Output bytes
gigabitEthernet0/1/16.1     00e0-fc12-3457          29            3114             5645             399694
----------------------------------------------------------------------------------------------------------------
Total matching items displayed = 1
Table 1 Description of the display mac accounting command output
Item Description
Port

Name of the interface.

MAC address

MAC address.

Input frames

Number of upstream packets.

Input bytes

Number of upstream bytes.

Output frames

Number of downstream packets.

Output bytes

Number of downstream bytes.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >