深入理解hybrid的工作原理
工作原理:一般交换机划分vlan后,必须用第三层的设备才能相互通讯,但由于华为的交换机端口有hybrid壮态,所以可用第二层设备使vlan间相互通讯,通过这个实验可以充分理解trunk与hybrid的不同
工作过程:交换机sw1与sw2的E0/0/0采用hybrid相连,sw1及sw4交换机工作在vlan10,sw2及sw3交换机工作在vlan20,通过设置使vlan 10与vlan 20间通讯
工作图:
工作过程:
一.交换机sw1的配置
[sw1]vlan 10
[sw1-vlan10]port e0/0/4
[sw1-vlan10]q
[sw1]int e0/0/0
[sw1-Ethernet0/0/0]port link-type hybrid
[sw1-Ethernet0/0/0]port hybrid pvid vlan 10
[sw1-Ethernet0/0/0]port hybrid vlan 10 untagged
Please wait... Done.
二.交换机sw2的配置
[sw2]vlan 20
[sw2-vlan20]port e0/0/4
[sw2-vlan20]q
[sw2]int e0/0/0
[sw2-Ethernet0/0/0]port link-type hybrid
[sw2-Ethernet0/0/0]port hybrid pvid vlan 20
[sw2-Ethernet0/0/0]port hybrid vlan 20 untagged
三.vlan10这边下层交换机的配置
[sw3]vlan 10
[sw3-vlan10]port e0/0/4
[sw3-vlan10]q
[sw3]int vlan
[sw3]int Vlan-interface 10
[sw3-Vlan-interface10]ip add 192.168.11.10 24
[sw3-Vlan-interface10]sh
[sw3-Vlan-interface10]un sh
四.vlan20这边下层交换机的配置
[sw4]vlan 20
[sw4-vlan20]port e0/0/4
[sw4-vlan20]int vlan 20
[sw4-Vlan-interface20]ip add 192.168.11.20 24
[sw4-Vlan-interface20]sh
[sw4-Vlan-interface20]un sh
五.检验效果
[sw3-Vlan-interface10]ping 192.168.11.20
Reply from 192.168.11.20: bytes=56 Sequence=1 ttl=255 time=13 ms
Reply from 192.168.11.20: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 192.168.11.20: bytes=56 Sequence=3 ttl=255 time=70 ms
Reply from 192.168.11.20: bytes=56 Sequence=4 ttl=255 time=50 ms
Reply from 192.168.11.20: bytes=56 Sequence=5 ttl=255 time=60 ms
--- 192.168.11.20 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 13/48/70 ms
[sw4]ping 192.168.11.10
Reply from 192.168.11.10: bytes=56 Sequence=1 ttl=255 time=200 ms
Reply from 192.168.11.10: bytes=56 Sequence=2 ttl=255 time=50 ms
Reply from 192.168.11.10: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.11.10: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 192.168.11.10: bytes=56 Sequence=5 ttl=255 time=60 ms
--- 192.168.11.10 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/80/200 ms