mac绑定和mac思科 Port Security

思科 Port Security feature 防范MAC/CAM攻击

思科Port Security feature 可以防止 MAC 和 MAC/CAM 攻击。通过配置 Port Security 可以控制: 端口上最大可以通过的 MAC 地址数量 端口上学习或通过哪些 MAC 地址 对于超过规定数量的 MAC 处理进行违背处理 端口上学习或通过哪些 MAC 地址,可以通过静态手

 

思科Port Security feature 可以防止 MACMAC/CAM 攻击。通过配置 Port Security 可以控制:


• 端口上最大可以通过的 MAC 地址数量


• 端口上学习或通过哪些 MAC 地址


• 对于超过规定数量的 MAC 处理进行违背处理


端口上学习或通过哪些 MAC 地址,可以通过静态手工定义,也可以在交换机自动学习。交换机动态学习端口 MAC ,直到指定的 MAC地址数量,交换机关机后重新学习。目前较新的技术是 Sticky Port Security ,交换机将学到的 mac地址写到端口配置中,交换机重启后配置仍然存在。


对于超过规定数量的 MAC 处理进行处理一般有三种方式(针对交换机型号会有所不同):


• Shutdown 。这种方式保护能力最强,但是对于一些情况可能会为管理带来麻烦,如某台设备中了病毒,病毒间断性伪造源 MAC 在网络中发送报文。


• Protect 。丢弃非法流量,不报警。


• Restrict 。丢弃非法流量,报警,对比上面会是交换机 CPU 利用率上升但是不影响交换机的正常使用。推荐使用这种方式。


1.4配置


port-security 配置选项:


Switch(config-if)# switchport port-security ?


aging Port-security aging commands


mac-address Secure mac address


maximum Max secure addresses


violation Security violation mode



配置 port-security 最大 mac 数目,违背处理方式,恢复方法


Cat4507(config)#int fastEthernet 3/48


Cat4507 (config-if)#switchport port-security


Cat4507 (config-if)#switchport port-security maximum 2


Cat4507 (config-if)#switchport port-security violation shutdown


Cat4507 (config)#errdisable recovery cause psecure-violation


Cat4507 (config)#errdisable recovery interval 30



通过配置 sticky port-security学得的MAC


interface FastEthernet3/29


switchport mode access


switchport port-security


switchport port-security maximum 5


switchport port-security mac-address sticky


switchport port-security mac-address sticky 000b.db1d.6ccd


switchport port-security mac-address sticky 000b.db1d.6cce


switchport port-security mac-address sticky 000d.6078.2d95


switchport port-security mac-address sticky 000e.848e.ea01

你可能感兴趣的:(mac,Security,绑定,port,思科)