某企业的交换机连接有很多用户,且相同业务用户通过不同的设备接入企业网络。为了通信的安全性,同时为了避免广播风暴,企业希望业务相同用户之间可以互相访问,业务不同用户不能直接访问。
如图:
PC1和PC1-2可以通信,都属于vlan101,PC2和PC2-2可以通信,都属于vlan102,PC1*和PC2不能通信。
1、拓扑图
1、SWA配置
<Huawei>undo terminal monitor Info: Current terminal monitor is off. <Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname SWA [SWA]vlan batch 101 102 Info: This operation may take a few seconds. Please wait for a moment...done. [SWA]int e0/0/1 [SWA-Ethernet0/0/1]port link-type access [SWA-Ethernet0/0/1]port default vlan 101 [SWA-Ethernet0/0/1]quit [SWA]int e0/0/2 [SWA-Ethernet0/0/2]port link-type access [SWA-Ethernet0/0/2]port default vlan 102 [SWA-Ethernet0/0/2]quit [SWA]int g0/0/1 [SWA-GigabitEthernet0/0/1]port link-type trunk [SWA-GigabitEthernet0/0/1]port trunk allow-pass vlan 101 102 [SWA-GigabitEthernet0/0/1]quit
2、SWB配置
<Huawei>sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname SWB [SWB]vlan batch 101 102 Info: This operation may take a few seconds. Please wait for a moment...done. [SWB]int e0/0/1 [SWB-Ethernet0/0/1]port link-type access [SWB-Ethernet0/0/1]port default vlan 101 [SWB-Ethernet0/0/1]quit [SWB]int e0/0/2 [SWB-Ethernet0/0/2]port link-type access [SWB-Ethernet0/0/2]port default vlan 102 [SWB-Ethernet0/0/2]quit [SWB]int g0/0/1 [SWB-GigabitEthernet0/0/1]port link-type trunk [SWB-GigabitEthernet0/0/1]port trunk allow-pass vlan 101 102 [SWB-GigabitEthernet0/0/1]quit [SWB]
3、测试
PC1pingPC1-2
PC2pingPC2-2
读书和健身总有一个在路上