华为交换机单独加入vlan太麻烦,思科交换机有批量加入vlan的方法,当然华为也有。要求 1~6口划分到vlan2,6~12口划分到vlan3,13~18口划分到vlan4,19~24口划分到vlan5.25,~26 加入trunk.
1、创建vlan 2~vlan4,4个vlan
也可以使用命令 batch 2 to 5
2、端口port1~port6划分到vlan2
[HW2700-2]port-group g2
[HW2700-2-port-group-g2]group-member Ethernet 0/0/1 to Ethernet 0/0/6 选择1~6 端口
[HW2700-2-port-group-g2]port link-type access 接口为access口,显示1~6口设置为access类型