一、实验拓扑图
配置pc1![](https://i-blog.csdnimg.cn/blog_migrate/b3f56ccf1e9b4e9acd9e58b3d88b452d.png)
配置pc2![](https://i-blog.csdnimg.cn/blog_migrate/9bb3deaebfc9163ae39e58ae0179d485.png)
配置pc3![](https://i-blog.csdnimg.cn/blog_migrate/88aeef7b768adbf1459dea3a17764533.png)
将sw1划分到vlan 3
[sw1]vlan 3
[sw1-vlan3]q
[sw1]interface e0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 3
将sw3划分到vlan 3
[sw3]interface e0/0/2
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]port default vlan 3
在sw1上进行缺省
[sw1]interface e0/0/1
[sw1-Ethernet0/0/1]port hybrid pvid vlan 3
将sw1上(g0/0/1)的untagged改为1 3
[sw1-Ethernet0/0/1]port hybrid untagged vlan 1 3
则在pc1上ping pc2可通