图做的不是很好 运维大神们勿喷!
[sw4]interface GigabitEthernet0/0/5
[SW4-GigabitEthernet0/0/5]port link-type trunk
[SW4-GigabitEthernet0/0/5]port trunk allow-pass vlan all[这里允许所有vlan通过]
[SW4]q[退出]
[SW4]interface GigabitEthernet0/0/3
[SW4-GigabitEthernet0/0/3]port link-type access
[SW4-GigabitEthernet0/0/3]port defualt vlan 10 [将端口加入vlan10]
[SW4]q
[SW4]interface GigabitEthernet0/0/1
[SW4-GigabitEthernet0/0/1]port link-type access
[SW4-GigabitEthernet0/0/1]port defualt vlan 10
[SW4]q
[SW4]interface GigabitEthernet0/0/2
[SW4-GigabitEthernet0/0/2]port link-type access
[SW4-GigabitEthernet0/0/2]port defualt vlan 20
[SW4]q
[SW4]interface GigabitEthernet0/0/4
[SW4-GigabitEthernet0/0/4]port link-type access
[SW4-GigabitEthernet0/0/4]port defualt vlan 20
接来下进行LSW6的配置
[SW6]interface GigabitEthernet0/0/1
[SW6-GigabitEthernet0/0/1]port link-type trunk
[SW6-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW6]q
[SW6]interface GigabitEthernet0/0/3
[SW6-GigabitEthernet0/0/3]port link-type access
[SW6-GigabitEthernet0/0/3]port defualt vlan 10
[SW6]q
[SW6]interface GigabitEthernet0/0/2
[SW6-GigabitEthernet0/0/2]port link-type access
[SW6-GigabitEthernet0/0/2]port defualt vlan 20
[SW6]q
我的思路:交换机sw4配置将pc1 pc2的端口[Ge0/0/2 Ge0/0/4]access链路后加入到vlan20,在将pc3 pc4的端口[Ge0/0/1 Ge0/0/3]配access链路后加入到vlan10 进行pc机之间的隔离, 交换机sw3与交换机sw6的端口配trunk链路,在交换机sw6进行配置pc8和pc7 将ge 0/0/3端口access链路后加入到vlan10 将ge0/0/2配置access链路后加入到vlan20 最后实现区域内的互通[也可以想做是一个部门 粉色区域是一个部门 蓝色区域是一个部门 蓝色区域不可以访问粉色区域 粉色区域也不可以访问蓝色区域]