Categories: 网络学习

华为HCIA实验-Hybrid端口综合实验

拓扑图

SWA配置

[SWA]vlan batch 10 20 100     //批量创建VLAN 10 20 100

Info: This operation may take a few seconds. Please wait for a moment…done.

[SWA]dis vlan

[SWA]int g0/0/2

[SWA-GigabitEthernet0/0/2]port hybrid untagged vlan 10 100    //配置端口untagged vlan10100

[SWA-GigabitEthernet0/0/2]port hybrid pvid vlan 10    //修改端口pvidvlan10

[SWA-GigabitEthernet0/0/2]int g0/0/3

[SWA-GigabitEthernet0/0/3]port hybrid untagged vlan 20 100

[SWA-GigabitEthernet0/0/3]port hybrid pvid vlan 20

[SWA-GigabitEthernet0/0/3]int g0/0/1

[SWA-GigabitEthernet0/0/1]port hybrid tagged vlan 10 20 100    //配置端口允许通过VLAN 10 20 100

[SWA-GigabitEthernet0/0/1]dis vlan

[SWA-GigabitEthernet0/0/1]dis port vlan active

SWB配置

[SWB]vlan batch 10 20 100

Info: This operation may take a few seconds. Please wait for a moment…done.

[SWB]int g0/0/2

[SWB-GigabitEthernet0/0/2]port hybrid untagged vlan 10 20 100

[SWB-GigabitEthernet0/0/2]port hybrid pvid vlan 100

[SWB-GigabitEthernet0/0/2]int g0/0/1

[SWB-GigabitEthernet0/0/1]port hybrid tagged vlan 10 20 100

[SWB]dis vlan

[SWB]dis port vlan active

完成后测试主机直接互通

Pc1可以ping通服务器不能ping通pc2

Pc2可以ping通服务器,不能ping通Pc1

实验完成

王哥哥

View Comments

    • 这么解释,比如我一台宿主机,然后只有一个网口,如果我把口划到trunk口,然后是hyper-v的,那我就只能给虚拟机用这个网口,因为虚拟机的网口能打vlan tag,我想管理这个宿主机管理不了了,口不够了,我用hybrid口,然后把宿主机管理也配这个口,不设置vlan标签,就正常用,放这个hybrid模式的口就也能管理,也能给vm当trunk用,不过我感觉好像实际用不到

Share
Published by
王哥哥