Hybrid:混合端口
可以成为access属性,一个端口属于一个VLAN
Int e0/0/1
Port hybrid pvid vlan 101
Port hybrid untagged vlan 101
也可以成为trunk属性,一个端口承载多个VLAN流量
Int g0/0/1
Port hybrid untagged vlan 101 102
例题1:
PC1-PC4设置IP地址和子网掩码(设置完成后点应用,否则输入无效)
SW1:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]user-interface console 0
[SW1-ui-console0]idle-timeout 0 0
[SW1-ui-console0]quit
[SW1]vlan batch 101 102
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port hybrid pvid vlan 101
[SW1-Ethernet0/0/1]port hybrid untagged vlan 101
[SW1-Ethernet0/0/1]quit
[SW1]int e0/0/2
[SW1-Ethernet0/0/2]port hybrid pvid vlan 102
[SW1-Ethernet0/0/2]port hybrid untagged vlan 102
[SW1-Ethernet0/0/2]quit
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 101 102
[SW1-GigabitEthernet0/0/1]quit
SW2:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]user-interface console 0
[SW2-ui-console0]idle-timeout 0 0
[SW2-ui-console0]quit
[SW2]vlan batch 101 102
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port hybrid pvid vlan 101
[SW2-Ethernet0/0/1]port hybrid untagged vlan 101
[SW2-Ethernet0/0/1]quit
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]port hybrid pvid vlan 102
[SW2-Ethernet0/0/2]port hybrid untagged vlan 102
[SW2-Ethernet0/0/2]quit
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port hybrid untagged vlan 101 102
[SW2-GigabitEthernet0/0/1]quit
命令结束后开始ping,相同VLAN间可以ping成功,不同VLAN间ping不通