华为交换机创建vlan命令如下
<Huawei>system-view
[Huawei]vlan batch 10 20 30 批量创建 vlan 10 20 30 也可以用vlan10 这样的命令单个单个创建
查看VLAN的详细配置
配置vlanif 命令如下
[Huawei]interface Vlanif 10 进入虚拟vlan接口
[Huawei-Vlanif10]ip address 192.168.10.1 24 设置IP地址也入输入ip address 192.168.10.1 255.255.255.0
[Huawei-Vlanif10]qu 退出[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip address 192.168.20.1 24
[Huawei-Vlanif20]quit[Huawei]interface Vlanif 30
[Huawei-Vlanif30]ip address 192.168.30.1 24
把端口划分到对应的vlan。端口1 vlan10 端口2 vlan20 端口3 vlan20
[Huawei]interface GigabitEthernet 0/0/1 进入端口1
[Huawei-GigabitEthernet0/0/1]port link-type access 设置端口模式为ACCESS
[Huawei-GigabitEthernet0/0/1]port default vlan 10 设置端口1为vlan10
[Huawei-GigabitEthernet0/0/1]qu 退出端口配置