Do all interfaces have MAC addresses

7

Each Layer 3 Ethernet interface has a MAC address.


A VLANIF interface obtains the device MAC address as its own MAC address. This MAC address is fixed.


A Bridge-if interface obtains the device MAC address as its own MAC address. This MAC address can be changed using the CLI.


The MAC address of a Layer 2 interface has no function on the AR.


NOTE:



  • To change the device MAC address, run the set system-mac { current | default } command in the diagnosis view, save the configuration, and restart the device.



  • The system MAC address to be modified cannot be a multicast MAC address.

Other related questions:
Why do two modular switches have the same MAC address
Each MPU of a switch has a default MAC address. When two MPUs are installed on SwitchA to function as the active and standby MPUs, the standby MPU will automatically use the MAC address of the active MPU as its own MAC address. When the standby MPU is removed from SwitchA and then installed on SwitchB to function as the active MPU of SwitchB, the MAC addresses of SwitchA and SwitchB become the same. You need to restore the default MAC address of the active MPU on SwitchB.

How do S series switches handle packets with all-0 MAC addresses
You can configure an S series (except the 1700) and E series switch to discard or forward packets with all-0 source or destination MAC addresses. The drop illegal-mac enable command enables a switch to discard packets with all-0 MAC addresses. By default, a switch does not discard packets with all-0 MAC addresses. The drop illegal-mac alarm command configures a switch to generate an alarm when receiving packets with all-0 MAC addresses. Note: The drop illegal-mac alarm command allows a switch to generate only one alarm. To enable the switch to generate more than one alarm. reconfigure the drop illegal-mac alarm command.

How to check the MAC address of an interface on an S series switch
For S series switches (except the S1700), you can obtain the MAC address of an interface as follows:
<HUAWEI> display interface gigabitEthernet 0/0/5
GigabitEthernet0/0/5 current state : DOWN                                      
Line protocol current state : DOWN                                             
Description:                                                                   
Switch Port, PVID :    1, TPID : 8100(Hex), The Maximum Frame Length is 9216   
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0018-1111-2121
Current system time: 2015-04-02 16:03:17+08:00

The value of the Hardware address field in the command output is the MAC address of the interface, which is the switch's MAC address when the interface is a Layer 2 interface.

How to bind the IP address, MAC address, and interface
The Switch implements binding between an interface and a MAC address through the traffic policy and DHCP snooping. Then the interface allows only the packets with the bound MAC address and packets matching the DHCP snooping binding table to pass through. The Switch does support binding of IP address + MAC address + interface. For example, to configure Ethernet 0/0/1 to allow only the packets with the source MAC address being 0-02-02 apart from of the packets matching the DHCP snooping binding table, and discard other packets, do as follows: # Enable DHCP snooping globally. [HUAWEI] dhcp snooping enable# Create an ACL that permits only the packets with the source MAC address being 0-02-02. [HUAWEI] acl 4000 [HUAWEI-acl-L2-4000] rule permit source-mac 0-02-02 ffff-ffff-ffff [HUAWEI-acl-L2-4000] rule deny# Create a traffic classifier that matches ACL 4000. [HUAWEI] traffic classifier c1 [HUAWEI-classifier-c1] if-match acl 4000# Create a traffic behavior and a traffic policy. [HUAWEI] traffic behavior b1 [HUAWEI-behavior-b1] permit [HUAWEI] traffic policy p1 [HUAWEI-trafficpolicy-p1] classifier c1 behavior b1# Apply the traffic policy to Ethernet 0/0/1 so that the interface allows only the packets with the source MAC address 0-02-02 to pass through apart from of the packets matching the DHCP snooping binding table. In V100R005C00 and later versions, the configuration is as follows: [HUAWEI] interface Ethernet 0/0/1 [HUAWEI-Ethernet0/0/1] port default vlan 4094 [HUAWEI-Ethernet0/0/1] ip source check user-bind enable [HUAWEI-Ethernet0/0/1] traffic-policy p1 inbound

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top