拓扑图 如下
命令
【LSW1】
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]vlan bat 10 20 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 30
[Huawei-Ethernet0/0/3]int vlanif 10
[Huawei-Vlanif10]ip add 192.168.10.254 24
[Huawei-Vlanif10]int vlanif 20
[Huawei-Vlanif20]ip add 192.168.20.254 24
[Huawei-Vlanif20]int vlanif 30
[Huawei-Vlanif30]ip add 192.168.30.254 24
[Huawei-Vlanif30]
验证结果
总结
最终实现主机能互相ping通