华为交换机创建vlan命令
创建vlan:
sys //进入配置视图
[huawei] vlan 10 //创建vlan 10,并进入vlan10配置视图
[huawei-vlan10] quit //回到配置视图
[huawei] vlan 100 //创建vlan 100,并进入vlan100配置视图
[huawei-vlan100] quit //回到配置视图
[huawei] interface GigabitEthernet2/0/1 //进入接口视图
[huawei- GigabitEthernet2/0/1] port link-type access //定义接口传输模式
[huawei- GigabitEthernet2/0/1] port default vlan 100 //将端口加入vlan100
huawei- GigabitEthernet2/0/1] quit
[huawei] interface GigabitEthernet1/0/0 //进入接口视图
[huawei- GigabitEthernet1/0/0] port link-type access
[huawei- GigabitEthernet2/0/1] port default vlan 10 //将这个接口加入到vlan10
[huawei- GigabitEthernet2/0/1] quit