system-view

[sw1]vlan batch 10 20 30 //创建VLAN 10 20 30

[sw1]vlan 10 //进入VLAN 管理视图

[sw1-vlan10]mux-vlan //配置VLAN10为Principal VLAN

[sw1-vlan10]subordinate group 20 //配置VLAN20为互通型从VLAN

[sw1-vlan10]subordinate separate 30 //配置VLAN30为隔离型从VLAN

[sw1-vlan10]quit

[sw1]interface g0/0/1

[sw1-GigabitEthernet0/0/1]port link-type access //配置接口模式为access

[sw1-GigabitEthernet0/0/1]port default vlan 10 //将接口加入VLAN10

[sw1-GigabitEthernet0/0/1]port mux-vlan enable //开启接口的mux-vlan功能

[sw1-GigabitEthernet0/0/1]interface g0/0/2

[sw1-GigabitEthernet0/0/2]port link-type access

[sw1-GigabitEthernet0/0/2]port default vlan 20

[sw1-GigabitEthernet0/0/2]port mux-vlan enable

[sw1-GigabitEthernet0/0/2]int g0/0/3

[sw1-GigabitEthernet0/0/3]port link-type access

[sw1-GigabitEthernet0/0/3]port default vlan 20

[sw1-GigabitEthernet0/0/3]port mux-vlan enable

[sw1-GigabitEthernet0/0/3]int g0/0/4

[sw1-GigabitEthernet0/0/4]port link-type access

[sw1-GigabitEthernet0/0/4]port default vlan 30

[sw1-GigabitEthernet0/0/4]port mux-vlan enable

[sw1-GigabitEthernet0/0/4]int g0/0/5

[sw1-GigabitEthernet0/0/5]port link-type access

[sw1-GigabitEthernet0/0/5]port default vlan 30

[sw1-GigabitEthernet0/0/5]port mux-vlan enable

使用display mux-vlan 查看mux-vlan的信息

[sw1]display mux-vlan

Principal Subordinate Type Interface


10 - principal GigabitEthernet0/0/1

10 30 separate GigabitEthernet0/0/4 GigabitEthernet0/0/5

10 20 group GigabitEthernet0/0/2 GigabitEthernet0/0/3