Setting the MAC address for an Ethernet interface or subinterface

In a network, when the Layer 3 Ethernet interfaces or subinterfaces of different devices have the same MAC address, the devices might fail to communicate correctly. To eliminate the MAC address conflicts, use the mac-address command to modify the MAC addresses of Layer 3 Ethernet interfaces or subinterfaces.

To set the MAC address of an Ethernet interface or subinterface:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter Ethernet interface or subinterface view.

interface interface-type { interface-number | interface-number.subnumber }

N/A

3. Set the MAC address of the Ethernet interface or subinterface.

mac-address mac-address

By default, the MAC address of a Layer 3 Ethernet interface or subinterface is not set.