实验要求:通过配置hybrid接口,实现相同vlan之间的通信和不同vlan之间的隔离(pc1和pc3通信,pc2和pc4通信)
进入交换机LSW3
[Huawei]vlan batch 10 20 创建vlan [Huawei-Etherenet0/0/1]port hybrid pvid vlan 20 修改Etherenet0/0/1的pvid [Huawei-Etherenet0/0/1]port hybrid untagged vlan 20 设置该接口不带TAG发送 [Huawei-Etherenet0/0/2]port hybrid pvid vlan 10 修改Etherenet0/0/2的pvid [Huawei-Etherenet0/0/2]port hybrid untagged vlan 10 设置该接口不带TAG发送 [Huawei-Etherenet0/0/3]port hybrid tagged vlan 10 20 设置该接口带TAG发送 [Huawei]display port vlan 查看交换机端口的vlan信息
进入LSW4:
[Huawei]vlan batch 10 20 创建vlan [Huawei-Etherenet0/0/1]port hybrid tagged vlan 10 20 设置该接口带TAG发送 [Huawei-Etherenet0/0/2]port hybrid pvid vlan 20 修改Etherenet0/0/2的pvid [Huawei-Etherenet0/0/2]port hybrid untagged vlan 20 设置该接口不带TAG发送 [Huawei-Etherenet0/0/3]port hybrid pvid vlan 10 修改Etherenet0/0/3的pvid [Huawei-Etherenet0/0/3]port hybrid untagged vlan 10 设置该接口不带TAG发送 [Huawei]display port vlan 查看交换机端口的vlan信息
ping命令检测通信结果: