当前位置 : 主页 > 手机开发 > 其它 >

Hybrid的一种特殊特性

来源:互联网 收集:自由互联 发布时间:2021-06-12
深入理解 hybrid 的工作原理 工作原理:一般交换机划分 vlan 后,必须用第三层的设备才能相互通讯,但由于华为的交换机端口有 hybrid 壮态,所以可用第二层设备使 vlan 间相互通讯,通

深入理解hybrid的工作原理

工作原理:一般交换机划分vlan后,必须用第三层的设备才能相互通讯,但由于华为的交换机端口有hybrid壮态,所以可用第二层设备使vlan间相互通讯,通过这个实验可以充分理解trunkhybrid的不同

工作过程:交换机sw1sw2E0/0/0采用hybrid相连,sw1sw4交换机工作在vlan10,sw2sw3交换机工作在vlan20,通过设置使vlan 10vlan 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

  PING 192.168.11.20: 56  data bytes, press CTRL_C to break

    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

  PING 192.168.11.10: 56  data bytes, press CTRL_C to break

    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

网友评论