No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


MAC Addresses Available on S Series Switches

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
MAC Addresses Available on S Series Switches

MAC Addresses Available on S Series Switches


This document describes what a Media Access Control (MAC) address is, which MAC addresses are supported by switches, and how to configure MAC addresses on interfaces.


This document applies to all S series switches.

Understanding MAC Addresses

Basic Concepts

A MAC address defines the location of a network device. It consists of 48 bits and is displayed as a 12-digit hexadecimal number. Bits 0 to 23 are assigned by the IETF and other institutions to identify vendors, and bits 24 to 47 are the unique ID assigned by vendors to identify their network interface cards (NICs).

MAC addresses fall into the following types:

  • Physical MAC address: uniquely identifies a terminal on an Ethernet network and is the globally unique hardware address.

  • Broadcast MAC address: indicates all terminals on a LAN. The broadcast address is all 1s (FF-FF-FF-FF-FF-FF).

  • Multicast MAC address: indicates a group of terminals on a LAN. All the MAC addresses with the eighth bit as 1 are multicast MAC addresses (for example, 01-00-00-00-00-00), excluding the broadcast MAC address. The multicast MAC address starting from 01-80-c2 is the BPDU MAC address, and is often used as the destination MAC address of protocol packets.

Supported MAC Addresses

The MAC addresses of a switch are classified into the system MAC address and interface MAC addresses.

  • The MAC addresses of an interface include the management interface MAC address, VLANIF interface MAC address, Layer 2 physical interface MAC address, Layer 3 Ethernet interface MAC address, sub-interface MAC addresses, Layer 2 Eth-Trunk interface MAC address, and Layer 3 Eth-Trunk interface MAC address.
  • The system MAC address is also called the device MAC address, which can be displayed using the display bridge mac-address command.

The management interface MAC address, sub-interface MAC addresses, Layer 2 physical interface MAC address, and Layer 2 Eth-Trunk interface MAC address are the same as the system MAC address. The other interface MAC addresses are different from the system MAC address and can be displayed using the display interface command.

Configuring an Interface MAC Address

If an Ethernet interface works in Layer 2 mode, the interface uses the system MAC address as its MAC address. If you run the undo portswitch command to switch the interface to Layer 3 mode, the system automatically allocates a MAC address to the interface. If different Ethernet interfaces are assigned with the same MAC address, MAC address conflict occurs. To solve this problem, you can run the mac-address mac-address command to manually configure a MAC address for the interface.

  • Only X1E and LE1D2S04SEC0 cards support interface MAC address configuration.
  • Ensure that the configured Ethernet interface MAC address does not conflict with an existing MAC address on the network.
  1. Run the interface interface-type interface-number command to enter the interface view.

    <HUAWEI> system-view 
    [HUAWEI] interface gigabitethernet 0/0/1

  2. Run the undo portswitch command to switch the Ethernet interface from Layer 3 mode to Layer 2 mode.

    By default, an Ethernet interface works in Layer 2 mode.

    [HUAWEI-GigabitEthernet0/0/1] undo portswitch 

  3. Run the mac-address mac-address command to configure a MAC address for the Ethernet interface.

    By default, the system automatically allocates a MAC address to an Ethernet interface.

    [HUAWEI-GigabitEthernet0/0/1] mac-address 0001-0001-0001

  4. Run the display interface [ interface-type [ interface-number ] ] command in any view or the display this interface command in the interface view to check the running status of the interface and check the configuration result. For details, see the Hardware address field in the command output.

    [HUAWEI-GigabitEthernet0/0/1] display this interface 
    GigabitEthernet0/0/1 current state : UP                                        
    Line protocol current state : UP                                               
    Switch Port, Link-type : access(negotiated),   
    PVID :    1, TPID : 8100(Hex), The Maximum Frame Length is 9216     
    IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0003-0003-0003  Last physical up time   : -

Configuring a Device MAC Address

Billions of devices exist on global networks, and each device has a MAC address. MAC addresses are managed and allocated by the IEEE. Theoretically, each device has a unique MAC address. However, MAC address conflicts may occur because of incorrect configuration. In addition, you may need to use a specified MAC address for a device to suit your network requirements. To avoid address conflicts, you may need to change the MAC address on a device.

  1. (Optional) Run the display system-mac command to check the current and default MAC addresses of the device.

    <HUAWEI> display system-mac 
    Current MAC-num      :16 
    Default MAC-num      :16 
    Index         MAC Addr
    default       0002-0002-0002  
    current       0002-0002-0002

  2. Run the set system-mac current hex-string [ chassis chassis-id ] command to configure the current MAC address of the device. (The chassis chassis-id parameter is valid only in a CSS.)

    <HUAWEI> set system-mac current 0003-0003-0003  
    Info: This operation may take a few seconds. Please wait for a moment...         
    Info: Set public MAC address for master successfully.                            
    Info: The mac-num has been changed, and the change will take effect after a reboot.

  3. Run the reboot command to restart the device.

    <HUAWEI> reboot 
    Info: The system is now comparing the configuration, please wait........ 
    Warning: The configuration has been modified, and it will be saved to the next s tartup saved-configuration file flash:/204.cfg. Continue? [Y/N]:y               
    Info: If want to reboot with saving diagnostic information, input 'N' and then e xecute 'reboot save diagnostic-information'.                                     
    System will reboot! Continue?[Y/N]:y


Device MAC addresses can be configured on modular switches only.

Each device is assigned a global unique identifier from the manufacturer. Do not change the MAC address of a device unless the change is absolutely necessary. If you change a MAC address, the modification takes effect only after the device restarts. When changing the MAC address, pay attention to the following points:
  • The MAC address cannot be all 0s or all 1s.

  • The device MAC address cannot be a multicast MAC address.

  • VRRP virtual MAC addresses cannot be configured.

  • If a device supports 16 MAC addresses, the last hexadecimal digit of the MAC address must be 0. If a device supports 256 MAC addresses, the last two hexadecimal digits of the MAC address must be 0.

Updated: 2019-08-05

Document ID: EDOC1100098007

Views: 214

Downloads: 14

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next