VLAN partitioning based on MAC addresses is divided into three types:
First type: Manually configure the static Mac VLAN
Second type: Dynamic trigger port joins static Mac VLAN
Third type: Dynamic Mac VLAN
This document describes the manual configuration of the first static Mac VLAN; Environment: H3C ENSP
First step: Build Vlan:vlan 100
Step two: (VLAN mode) creates a static association of the MAC addresses of all the hosts in the VLAN with that VLAN:
Mac-vlan mac-address H-h-h-h (host MAC address)
....
Step Three: (System mode) Enter all ports applied to the static Mac VLAN
Fourth step: (port mode) set the port's link type to hybrid type, so that the port
can receive and send data frames for multiple VLANs,
Fifth step: (interface mode) to strip all the static Mac VLAN data frames to label:
Port hybrid untagged VLAN 100
Sixth step: (interface mode) Start the Mac-vlan function of the port
Instance:
Configuration of Switch 1:
[Huawei]display current-configuration
#
sysname Huawei
#
VLAN Batch 100 200
#
Cluster enable
NTDP Enable
NDP enable
#
Drop Illegal-mac Alarm
#
DiffServ domain Default
#
Drop-profile Default
#
VLAN 100
Mac-vlan mac-address 5489-9831-1ba8 Priority 0
VLAN 200
Mac-vlan mac-address 5489-98d7-0f68 Priority 0
#
Aaa
Authentication-scheme Default
Authorization-scheme Default
Accounting-scheme Default
Domain default
Domain Default_admin
Local-user Admin Password Simple admin
Local-user Admin Service-type http
#
Interface VLANIF1
#
Interface METH0/0/1
#
Interface ETHERNET0/0/1
Port Link-type Trunk
Port Trunk Allow-pass VLAN 2 to 4094
#
Interface ETHERNET0/0/2
Port hybrid untagged VLAN 2 to 4094
Mac-vlan Enable
#
Interface ETHERNET0/0/3
Port hybrid untagged VLAN 2 to 4094
Mac-vlan Enable
#
Interface ETHERNET0/0/4
#
Interface ETHERNET0/0/5
#
Interface ETHERNET0/0/6
#
Interface ETHERNET0/0/7
#
Interface ETHERNET0/0/8
#
Interface ETHERNET0/0/9
#
Interface ETHERNET0/0/10
#
Interface ETHERNET0/0/11
#
Interface ETHERNET0/0/12
#
Interface ETHERNET0/0/13
#
Interface ETHERNET0/0/14
#
Interface ETHERNET0/0/15
#
Interface ETHERNET0/0/16
#
Interface ETHERNET0/0/17
#
Interface ETHERNET0/0/18
#
Interface Ethernet0/0/19
#
Interface ETHERNET0/0/20
#
Interface ETHERNET0/0/21
#
Interface ETHERNET0/0/22
#
Interface GIGABITETHERNET0/0/1
#
Interface GIGABITETHERNET0/0/2
#
Interface NULL0
#
User-interface Con 0
User-interface vty 0 4
#
Return
Configuration of Switch 2:
[Huawei]display current-configuration
#
sysname Huawei
#
VLAN Batch 100 200
#
Cluster enable
NTDP Enable
NDP enable
#
Drop Illegal-mac Alarm
#
DiffServ domain Default
#
Drop-profile Default
#
VLAN 100
Mac-vlan mac-address 5489-98b0-7531 Priority 0
VLAN 200
Mac-vlan mac-address 5489-982b-25f1 Priority 0
#
Aaa
Authentication-scheme Default
Authorization-scheme Default
Accounting-scheme Default
Domain default
Domain Default_admin
Local-user Admin Password Simple admin
Local-user Admin Service-type http
#
Interface VLANIF1
#
Interface METH0/0/1
#
Interface ETHERNET0/0/1
Port Link-type Trunk
Port Trunk Allow-pass VLAN 2 to 4094
#
Interface ETHERNET0/0/2
Port hybrid untagged VLAN 2 to 4094
Mac-vlan Enable
#
Interface ETHERNET0/0/3
Port hybrid untagged VLAN 2 to 4094
Mac-vlan Enable
#
Interface ETHERNET0/0/4
#
Interface ETHERNET0/0/5
#
Interface ETHERNET0/0/6
#
Interface ETHERNET0/0/7
#
Interface ETHERNET0/0/8
#
Interface ETHERNET0/0/9
#
Interface ETHERNET0/0/10
#
Interface ETHERNET0/0/11
#
Interface ETHERNET0/0/12
#
Interface ETHERNET0/0/13
#
Interface ETHERNET0/0/14
#
Interface ETHERNET0/0/15
#
Interface ETHERNET0/0/16
#
Interface ETHERNET0/0/17
#
Interface ETHERNET0/0/18
#
Interface Ethernet0/0/19
#
Interface ETHERNET0/0/20
#
Interface ETHERNET0/0/21
#
Interface ETHERNET0/0/22
#
Interface GIGABITETHERNET0/0/1
#
Interface GIGABITETHERNET0/0/2
#
Interface NULL0
#
User-interface Con 0
User-interface vty 0 4
#
Return
PC4 Test diagram:
PC3 Test diagram:
Static Mac VLAN configuration essentials and examples