The mac-address command configures a MAC address for the current Eth-Trunk interface.
The undo mac-address command deletes the configured MAC address from the current Eth-Trunk interface.
By default, the MAC address of an Eth-Trunk interface is the system MAC address, that is, the MAC address of the Ethernet interface on the main control board.
| Parameter | Description | Value |
|---|---|---|
| mac-address | MAC address of the Eth-Trunk interface | The value is in the format of H-H-H. Each H stands for one to four hexadecimal digits, such as 00e0 and fc01. If an H contains less than four bits, 0 is padded ahead. For example, if you specify an H as e0, it is displayed as 00e0. A MAC address cannot be set to all 0s or all 1s. |
Usage Scenario
Each station or server connected to an Ethernet interface of a device has its own MAC address. The MAC address table on the device records information about the MAC addresses of connected devices.
When a Layer-3 FW is connected to a Layer-2 switch through two Eth-Trunk links for different services, if both Eth-Trunk interfaces on the FW adopt the default system MAC address, the system MAC address is learned by the switch and alternates between the two Eth-Trunk interfaces. In this case, a loop probably occurs between the two devices. To prevent loops, you can change the MAC address of an Eth-Trunk interface by using the mac-address command. By configuring the source and destination MAC addresses for two Eth-Trunk links, you can guarantee the normal transmission of service data flows and improve the network reliability.
Prerequisites
The Eth-Trunk interface is correctly configured.
Configuration Impact
After the MAC address of an Eth-Trunk interface is changed, the device sends gratuitous ARP packets to update the mapping relationship between MAC addresses and ports.
Precautions
The mac-address command can be used only when the Eth-Trunk interface is in Layer-3 mode.