利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试.docx
- 文档编号:6630372
- 上传时间:2023-01-08
- 格式:DOCX
- 页数:4
- 大小:65.63KB
利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试.docx
《利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试.docx》由会员分享,可在线阅读,更多相关《利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试.docx(4页珍藏版)》请在冰豆网上搜索。
利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试
利用二层端口安全防止两个三层交换机长距离光纤线路被乱接测试
2013-11-0916:
15:
23 我来说两句
收藏
我要投稿
一.概述:
在论坛上看到有人想问通过什么方式来防止长距离的光纤线路被窃听,或连到其它非法交换机上,如是相同通过端口安全来实现防止乱接,于是登录机架进行测试,将测试结果记录下来。
论坛提问的链接:
----光纤线路,如果中间没有被恶意接入其他设备,应该很难窃听,因此觉得防窃听可以从防乱接方向入手。
二.基本思路:
A.假定交换机为三层交换机
B.如果两个交换机用三层口相连,并绑定对端IP所对应的mac,虽然可以防止接入三层设备,但是无法防止中间串接二层设备进行窃听。
C.通过主机之间的ipsec来加密流量,除非接线两端为路由器,否则两端连接交换机的主机太多的话,每台主机去配置IPsec不大可行。
-----高端的交换机没有玩过,一般普通的三层交换机貌似无法配置ipsecvpn
D.数据加密虽然是防窃听的最好方式,但是目前这种情况,貌似加密不容易实现
E.通过二层的安全来防止乱接:
---交换机相连的口采用access口,并且两端都配置VLAN的svi
---每个交换机保证用于互联的vlan只有一个互联接口
---三层交换机要开启路由转发,两个三层交换机互指路由(静态或默认),来实现交换机两边的PC互访
---配置互联端口的端口安全,只允许学习到2个mac,这样只有中间线路没有其他二层设备,当接入其他二层设备时,端口就会down,防止被监听
---本实验只是验证可行性,实际工作如果可能的话,还是建议用路由器互联,并配置ipsec。
三.测试拓扑:
四.基本配置:
A.R4:
interfaceFastEthernet0/0
ipaddress20.1.1.4255.255.255.0
noshut
noiprouting
ipdefault-gateway20.1.1.1
B.SW1:
iprouting
interfaceFastEthernet0/4
switchportaccessvlan20
switchportmodeaccess
interfaceFastEthernet0/20
switchportaccessvlan10
switchportmodeaccess
switchportport-securitymaximum2
switchportport-security
switchportport-securitymac-addresssticky
interfaceVlan10
ipaddress10.1.1.1255.255.255.252
interfaceVlan20
ipaddress20.1.1.1255.255.255.0
iproute0.0.0.00.0.0.010.1.1.2
C.SW2:
iprouting
interfaceFastEthernet0/5
switchportaccessvlan30
switchportmodeaccess
interfaceFastEthernet0/20
switchportaccessvlan10
switchportmodeaccess
switchportport-securitymaximum2
switchportport-security
switchportport-securitymac-addresssticky
interfaceVlan30
ipaddress30.1.1.1255.255.255.0
interfaceVlan100
ipaddress10.1.1.2255.255.255.252
iproute0.0.0.00.0.0.010.1.1.1
D.R5:
interfaceFastEthernet0/1
ipaddress30.1.1.5255.255.255.0
noshut
noiprouting
ipdefault-gateway30.1.1.1
五.验证:
R4#ping30.1.1.5
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto30.1.1.5,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/1/4ms
R4#
R5#ping20.1.1.4
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto20.1.1.4,timeoutis2seconds:
!
!
!
!
!
Successrateis100percent(5/5),round-tripmin/avg/max=1/2/4ms
R5#
sw1#showrunning-configinterfacef0/20
Buildingconfiguration...
Currentconfiguration:
336bytes
!
interfaceFastEthernet0/20
switchportaccessvlan10
switchportmodeaccess
switchportport-securitymaximum2
switchportport-security
switchportport-securitymac-addresssticky
switchportport-securitymac-addresssticky0014.a80a.f716vlanaccess
switchportport-securitymac-addresssticky0014.a80a.f741vlanaccess
end
sw2#showintf0/20|inHardware
HardwareisFastEthernet,addressis0014.a80a.f716(bia0014.a80a.f716)
sw2#showintvlan10|inHardware
HardwareisEtherSVI,addressis0014.a80a.f741(bia0014.a80a.f741)
sw1#showmacaddress-table|in0/20
100014.a80a.f716STATICFa0/20
100014.a80a.f741STATICFa0/20
sw1#
sw2#showrunning-configintf0/20
Buildingconfiguration...
Currentconfiguration:
312bytes
!
interfaceFastEthernet0/20
switchportaccessvlan10
switchportmodeaccess
switchportport-securitymaximum2
switchportport-security
switchportport-securitymac-addresssticky
switchportport-securitymac-addresssticky001a.a164.b216
switchportport-securitymac-addresssticky001a.a164.b241
end
sw1#showintf0/20|inHardware
HardwareisFastEthernet,addressis001a.a164.b216(bia001a.a164.b216)
sw1#showintvlan10|inHardware
HardwareisEtherSVI,addressis001a.a164.b241(bia001a.a164.b241)
sw2#showmacaddress-table|in0/20
10001a.a164.b216STATICFa0/20
10001a.a164.b241STATICFa0/20
---因为机架无法默认中间加入其它二层设备,但是可以通过往互联接口所在vlan添加其他接口来测试,因为接口收到其他mac地址的包,接口会down。
三
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 利用 端口 安全 防止 两个 三层 交换机 长距离 光纤 线路 被乱接 测试
![提示](https://static.bdocx.com/images/bang_tan.gif)