华为私有接口类型hybrid
Tip:hybrid类型,简称混合型接口。
本次实验模拟2层网络下 vlan10 vlan20 不能互访,vlan10 vlan20 同时可以访问vlan100
sw1配置如下:
<Huawei>sy
[Huawei]sys sw1
[sw1]vl ba 10 20 100
[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]
[sw1-GigabitEthernet0/0/1]port link-type hybrid
//设置端口类型为hybrid
[sw1-GigabitEthernet0/0/1]port hybrid pvid vlan 10
//设置端口所属vlan
[sw1-GigabitEthernet0/0/1]port hybrid untagged vlan 10 100
//设置端口添加 untagg标签(vlan10 vlan100 不带tag标签)
[sw1-GigabitEthernet0/0/1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type hybrid
[sw1-GigabitEthernet0/0/2]port hybrid pvid vlan 20
[sw1-GigabitEthernet0/0/2]port hybrid untagged vlan 20 100
[sw1-GigabitEthernet0/0/2]int g0/0/3
[sw1-GigabitEthernet0/0/3]port link-type hybrid
//设置端口类型
[sw1-GigabitEthernet0/0/3]port hybrid tagged vlan 10 20 100
//设置端口添加 tag标签(vlan10 vlan20 vlan100 添加tag标签)
sw2配置如下:
<Huawei>sy
[sw2]vla ba 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[sw2]int g0/0/2
[sw2-GigabitEthernet0/0/2]port hybrid tagged vlan 10 20 100
[sw2-GigabitEthernet0/0/2]int g0/0/1
[sw2-GigabitEthernet0/0/1]p l h
[sw2-GigabitEthernet0/0/1]p h pv vl 100
[sw2-GigabitEthernet0/0/1]port hybrid untagged vlan 10 20 100