华为交换机批量加入 Vlan 方法

华为交换机单独加入vlan太麻烦,思科有批量加入vlan的方法,华为也有。要求 1~6口划分到vlan2,6~12口划分到vlan3,13~18口划分到vlan4,19~24口划分到vlan5.25,~26 加入trunk.

    1. 创建vlan 2~vlan4,4个vlan
      华为交换机批量加入 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类型
      华为交换机批量加入 Vlan 方法
      [HW2700-2-port-group-g2]port default vlan 2 端口组所有端口加入vlan2.

      [HW2700-2]dis vlan 显示vlan信息
      华为交换机批量加入 Vlan 方法
      3 .port7~port12加入vlan3.
      [HW2700-2]port-group g3
      [HW2700-2-port-group-g3]group-member Ethernet 0/0/6 to Ethernet 0/0/12
      [HW2700-2-port-group-g3]port link-type access 所有接口配置为access类型
      [HW2700-2-port-group-g3]port default vlan 3 显示如下
      华为交换机批量加入 Vlan 方法
      4.同理,端口1318,19~24分别划分到vlan4,vlan5方法相同。
      [HW2700-2]dis vlan 显示vlan信息如下:

      华为交换机批量加入 Vlan 方法
      5 端口25~26口为光口电口复用端口,配置trunk.
      [HW2700-2]dis interface brief 查看所有端口信息
      华为交换机批量加入 Vlan 方法
      [HW2700-2]port-group g6
      [HW2700-2-port-group-g6]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 选择2端口
      [HW2700-2-GigabitEthernet0/0/1]port link-type trunk 端口G0 /0/1~G0/0/2 加入trunk.
      <HW2700-2>display current-configuration
      华为交换机批量加入 Vlan 方法
      已经是trunk了。

猜你喜欢

转载自www.cnblogs.com/landv/p/9208557.html