//(建立vlan,交换机g0/0/1加入vlan <Huawei>sys [Huawei]vlan 11[Huawei-vlan11]q [Huawei]intg0/0/1[Huawei-GigabitEthernet0/0/1]port link-type access [Huawei-GigabitEthernet0/0/1]port default vlan 11[Huawei-GigabitEthernet0/0/1]q [Huawei]q <Huawei>save -------------------------------------------------------------------------------- //建立多个vlan,多个端口加入vlan,清除端口配置 [Huawei]vlan batch 10100//建立vlan10和vlan100两个vlan [Huawei]vlan batch 10to 100//建立10-100这90个vlan //多个端口加入vla [Huawei] port-group temp [Huawei]group-member g0/0/1to g0/0/10[Huawei]port link-type access [Huawei]port default vlan 10[Huawei]quit //清除端口配置 [Huawei]clear configuration interface GigabitEthernet 0/0/10-------------------------------------------------------------------------------- //删除交换机g0/0/1的vlan,删除交换机g0/0/1的access,删除vlan11 [Huawei]intg0/0/1[Huawei-GigabitEthernet0/0/1]undo port default vlan [Huawei-GigabitEthernet0/0/1]undo port link-type [Huawei-GigabitEthernet0/0/1]q [Huawei]undo vlan 11[Huawei]q <Huawei>save
------------------------------------------------------------------------------------
//建立基于MAC的vlan,基于PC1 MAC的vlan23,基于PC2 MAC的vlan24
<Huawei>sys [Huawei]intg0/0/23[Huawei-GigabitEthernet0/0/23]port link-type access [Huawei-GigabitEthernet0/0/23]port default vlan 23[Huawei-GigabitEthernet0/0/23]q [Huawei]intg0/0/24[Huawei-GigabitEthernet0/0/24]port link-type access [Huawei-GigabitEthernet0/0/24]port default vlan 24[Huawei-GigabitEthernet0/0/24]dis th #interface GigabitEthernet0/0/24port link-type access port default vlan 24#return[Huawei-GigabitEthernet0/0/24]q [Huawei]
[Huawei]vlan 23[Huawei-vlan23]mac-vlan mac-address 0000-0000-0011[Huawei]intg0/0/1[Huawei-GigabitEthernet0/0/1]port hybrid untagged vlan 23[Huawei-GigabitEthernet0/0/1]mac-vlan enable
[Huawei]vlan 24[Huawei-vlan24]mac-vlan mac-address 0000-0000-0022[Huawei]intg0/0/2[Huawei-GigabitEthernet0/0/2]port hybrid untagged vlan 24[Huawei-GigabitEthernet0/0/2]mac-vlan enable
---------------------------------------------------------------------------------------
//删除[Huawei-GigabitEthernet0/0/1]undo mac-vlan enable [Huawei-GigabitEthernet0/0/1]undo port hybrid vlan 23[Huawei-GigabitEthernet0/0/1]q [Huawei]intg0/0/23[Huawei-GigabitEthernet0/0/23]undo port link-type [Huawei-GigabitEthernet0/0/23]undo port defaultvlan [Huawei-GigabitEthernet0/0/23]q [Huawei]vlan 23[Huawei-vlan23]undo mac-vlan mac-address 0000-0000-0011[Huawei-vlan23]q [Huawei]undo vlan 11[Huawei]q <Huawei>save ----------------------------------------------------------------------------------- //查看vlan详细情况[Huawei]dis vlan 23verbose //关闭信息提示[Huawei]]undo info-center enable //改名[Huawei]sysname Huawei //查看端口与vlan对应关系[Huawei]dis port vlan //查看端口详细信息[Huawei]dis intg0/0/1//建vlan23和vlan24[Huawei]intvlan batch 2324//建vlan20-vlan30,10个vlan[Huawei]intvlan batch 20to 30//多个端口加入同一vlan[Huawei]port-groupcaiwu [Huawei]group-member g0/0/1to g0/0/24[Huawei]port link-type access [Huawei]port defaultvlan 10[Huawei]quit //清除交换机所有配置并重启<Huawei>reset saved-configuration <Huawei>reboot
声明:易商讯尊重创作版权。本文信息搜集、整理自互联网,若有来源标记错误或侵犯您的合法权益,请联系我们。我们将及时纠正并删除相关讯息,非常感谢!