MAC-based VLAN assignment on S series switch

Example of configuring MAC address-based VLAN assignment for S series switches (except S1700 switches):
1. Configuration roadmap
1). Create a VLAN and determine the VLAN to which employees belong.
2). Configure the modes in which interfaces are added to the VLAN, so that the interfaces allow packets of the VLAN to pass through.
3). Associate the MAC address with the VLAN, so that the switch can determine the VLAN to which received packets belong according to the source MAC address in the packets.
2. Configuration procedure
[HUAWEI] vlan batch 10 //Create a VLAN.
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/1] port hybrid tagged vlan 10 //Add an uplink interface to the VLAN in tagged mode.
[HUAWEI-GigabitEthernet0/0/1] quit
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] port link-type hybrid
[HUAWEI-GigabitEthernet0/0/2] port hybrid untagged vlan 10 //Add a downlink interface to the VLAN in untagged mode.
[HUAWEI-GigabitEthernet0/0/2] quit
[HUAWEI] vlan 10
[HUAWEI-vlan10] mac-vlan mac-address 22-22-22 //Associate the PC's MAC address with VLAN 10.
[HUAWEI-vlan10] quit
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] mac-vlan enable //Enable MAC address-based VLAN assignment on the downlink interface.
[HUAWEI-GigabitEthernet0/0/2] quit

Scroll to top