实验拓扑图:
实验要求:全网可达
步骤一:创建、划分vlan
sw2
[Huawei]vlan 3 //创建vlan
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/1]port link-type access //改模式为接入
[Huawei-Ethernet0/0/3]port default vlan 3 //划入vlan
sw3
[Huawei]vlan 4
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 4sw4
[Huawei]vlan 2
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 2
步骤二:使用混杂模式,全网可通
[sw2-Ethernet0/0/3]port hybrid pvid vlan 3
[sw2-Ethernet0/0/3]port hybrid untagged vlan 3[sw3-Ethernet0/0/2]port hybrid pvid vlan 4
[sw3-Ethernet0/0/2]port hybrid untagged vlan 4[sw4-Ethernet0/0/1]port hybrid pvid vlan 2
[sw4-Ethernet0/0/1]port hybrid untagged vlan 2
最后,可以ping通,全网可达