现在我们就开始![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/d5e0d94b03343d5fdfa28914dbd27848.png#pic_center)
启动模拟器
system-view
[Huawei]sysname sw1
[sw1]vlan 10
[sw1-vlan10]quit
[sw1]port-group 1
[sw1-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/10
[sw1-port-group-1]port link-type access
[sw1-GigabitEthernet0/0/1]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/2]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/3]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/4]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/5]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/6]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/7]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/8]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/9]port link-type access //接口类型为access
[sw1-GigabitEthernet0/0/10]port link-type access //接口类型为access
[sw1-port-group-1]port default vlan 10
[sw1-GigabitEthernet0/0/1]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/2]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/3]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/4]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/5]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/6]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/7]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/8]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/9]port default vlan 10//成功把接口加入vlan10
[sw1-GigabitEthernet0/0/10]port default vlan 10//成功把接口加入vlan10
查看vlan配置情况
[sw1]display vlan
The total number of vlans is : 2
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
VID Type Ports
1 common UT:GE0/0/11(U) GE0/0/12(U) GE0/0/13(D) GE0/0/14(D)
GE0/0/15(D) GE0/0/16(D) GE0/0/17(D) GE0/0/18(D)
GE0/0/19(D) GE0/0/20(D) GE0/0/21(D) GE0/0/22(D)
GE0/0/23(D) GE0/0/24(D)
10 common UT:GE0/0/1(U) GE0/0/2(U) GE0/0/3(D) GE0/0/4(D)
GE0/0/5(D) GE0/0/6(D) GE0/0/7(D) GE0/0/8(D)
GE0/0/9(D) GE0/0/10(D)
VID Status Property MAC-LRN Statistics Description
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
查看交换机当前配置
[sw1]display current-configuration //current(当前的,现在发生的)