The mac-address command configures a MAC address for an interface.
The undo mac-address command restores the default MAC address of an interface.
By default, the MAC address of the interface is the system MAC address.
Parameter | Description | Value |
---|---|---|
mac-address |
Specifies the MAC address of the interface. |
The value is in the format of H-H-H. Each H is a 4-digit hexadecimal number, such as 00e0 or fc01. If an H contains less than four bits, 0 is padded ahead. For example, if e0 is entered, it is equal to 00e0. A MAC address cannot be set to all 0s or all 1s. |
100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE interface view, PW-VE interface view, VBDIF interface view, VE interface view, VLANIF interface view
Usage Scenario
To ensure the normal transmission of service data flows, run the mac-address command to configure the MAC address of the interface based on users' requirements.
Prerequisites
Run either of the following commands to configure the Ethernet sub-interface before running the mac-address command.
Configuration Impact
After the MAC address of an interface is changed, the device sends gratuitous ARP packets to update the mapping relationship between MAC addresses and interfaces.