VLAN Hybrid
一.实验目的
了解Hybrid端口的特性,并能灵活的使用,允许PC2,PC3与PC1互通,PC2和PC3不能互通
二.实验拓扑
一.实验步骤
1.为计算机配置IP地址
2.将于计算机相连的端口改为Hybrid,设置相应PVID
3.测试连通性
4.为各个Hybrid 端口设置untagged
5.再测试连通性
四.实验内容
1.PC配置IP地址
PC1
<H3C>system-view
[H3C]sysname ZJPC1
[ZJPC1]interface GigabitEthernet 0/0
[ZJPC1-GigabitEthernet0/0]ip address 1.1.1.1 24
[ZJPC1-GigabitEthernet0/0]undo shutdown
PC2
<H3C>system-view
[H3C]sysname ZJPC2
[ZJPC2]interface GigabitEthernet 0/0
[ZJPC2-GigabitEthernet0/0]ip address 1.1.1.2 24
[ZJPC2-GigabitEthernet0/0]undo shutdown
PC3
<H3C>system-view
[H3C]sysname ZJPC3
[ZJPC3]interface GigabitEthernet 0/0
[ZJPC3-GigabitEthernet0/0]ip address 1.1.1.3 24
[ZJPC3-GigabitEthernet0/0]undo shutdown
2.将交换机连接PC的端口设置为Hybrid端口,设置相应PVID
<H3C>system-view
[H3C]sysname ZJSW1
[ZJSW1]interface GigabitEthernet 1/0/1
[ZJSW1-GigabitEthernet1/0/1]port link-type hybrid
[ZJSW1-GigabitEthernet1/0/1]port hybrid pvid vlan 10
[ZJSW1-GigabitEthernet1/0/1]interface GigabitEthernet 1/0/2
[ZJSW1-GigabitEthernet1/0/2]port link-type hybrid
[ZJSW1-GigabitEthernet1/0/2]port hybrid pvid vlan 20
[ZJSW1-GigabitEthernet1/0/2]interface GigabitEthernet 1/0/3
[ZJSW1-GigabitEthernet1/0/3]port link-type hybrid
[ZJSW1-GigabitEthernet1/0/3]port hybrid pvid vlan 30
测试连通性
PC1 PING PC2
PC1 PING 不通PC2 因为两个接口不在同一VLAN
PC1 PING PC3
也PING 不通,原因同上
现在我们将接口的untagged 都加上,再测试
PC1 PING PC2
PC1 PING PC3
PC2 PING PC1
PC2 PING PC3
PC3 PING PC1
PC3 PING PC2
现在PC1和PC2 PC3直接都互通, PC2 和PC1 通,和PC3不通,PC3和PC1通但是和PC2不通