第一步,给pc配置IP192.268.1.2-192.168.1.4
第二步,在三个交换机上划分vlan
[sw1]vlan 3
[sw1]interface e0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 3
[sw2]vlan 2
lsw2]interface e0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 2
[sw3]vlan 4
[sw3]interface e0/0/2
[sw3-Ethernet0/0/2]port link-type access
[sw3-Ethernet0/0/2]port default vlan 4
第三步,在sw2上打标记
[sw2]interface e0/0/1
[sw2-Ethernet0/0/1]port hybrid tagged vlan 1 2
最后在sw1上进行缺省,将其0/0/1端口untagged改成1 3
[sw1]interface e0/0/1
[sw1-Ethernet0/0/1]port hybrid pvid vlan 3
[sw1-Ethernet0/0/1]port hybrid untagged vlan 1 3