85、交换机安全MAC层攻击配置实验之Port-Security
时间:2022-04-03 11:13
1、Port Security解析
触发Port Security的条件:
protect Security violation protect mode 丢弃数据,不发送SNMP Trap消息
restrict Security violation restrict mode 丢弃数据帧,发送SNMP Trap消息
shutdown Security violation shutdown mode 关闭接口,发送SNMP Trap消息
2、实验拓扑
3、实验配置
正常情况下的连通性
在S1上启动端口安全,只让端口学习aaaa.bbbb.cccc的MAC地址,采用protect的动作
interface GigabitEthernet0/31
switchport mode access
switchport port-security
switchport port-security violation protect
switchport port-security mac-address aaaa.bbbb.cccc
再次测试连通性
此外还可以设置端口可以学习的最大MAC地址个数以及设置粘性粘贴
S1(config-if)#switchport port-security maximum ?
<1-3072> Maximum addresses
S1(config-if)#switchport port-security mac-address sticky ?
<cr>
本文出自 “” 博客,请务必保留此出处