PC | IP地址 | 子网掩码 | MAC地址 | 端口 |
---|---|---|---|---|
PC1 | 192.168.1.10 | 24 | 0A-00-27-00-00-06 | e1/0/1 |
PC2 | 192.168.1.11 | 24 | 00-0b-4c-9e-2a-1c | e1/0/2 |
PC3 | 192.168.1.12 | 24 | 00-0b-5C-aa-1a-1c | e1/0/3 |
端口配置模式“switchport port-security”打开端口防护
端口配置模式“switchport port-security mac-address D8-80-83-A7-7D-91”绑定MAC地址
“show port-security interface ethernet 1/0/1”查看1号端口的安全信息
“switchport port-security maximum 2”更改最大MAC地址数
全局配置模式“am enable”启动访问管理功能
端口配置模式“am port”对该端口进行访问管理
端口配置模式“am mac-ip-pool 68-DA-73-A2-1E-C8 192.168.1.10”将端口绑定为PC1的MAC地址和IP地址
switch>en
switch#config
switch(config)#int e 1/0/1
switch(config-if-ethernet1/0/1)#sw port-security
switch(config-if-ethernet1/0/1)#sw port-security mac-address 04-7D-7B-48-18-0A
switch>en
switch#config
switch(config)#int e 1/0/1
switch(config-if-ethernet1/0/1)#switchport port-security maximum 2
switch(config-if-ethernet1/0/1)#sw port-security mac-address 0A-00-27-00-00-06
switch(config-if-ethernet1/0/1)#sw port-security mac-address 00-0b-4c-9e-2a-1c
switch>en
switch#config
switch(config)#am enable
switch(config)#int e 1/0/1
switch(config-if-ethernet1/0/1)#am port
switch(config-if-ethernet1/0/1)#am mac-ip-pool 68-DA-73-A2-1E-C8 192.168.1.10
inter e1/0/1
switchport port-security violation shutdown
inter e1/0/1
switchport port-security violation restrict
inter e1/0/1
switchport port-security violation recovery
inter e1/0/1
switchport port-security violation protect
为防止终端产生 MAC 地址泛洪攻击,请配置端口安全,已划分 VLAN41 的端口最多学习到5个MAC 地址,发生违规阻止后续违规流量通过,不影响已有流量并产生 LOG 日志;连接 PC1 的接口为专用接口,限定只允许 PC1的 MAC 地址可以连接。
看到端口安全,所以题目下面那些是端口安全的子配置 找就完事了
mac-address-learning cpu-control (这个需要提前开)
switchport port-security
switchport port-security maximum 5
switchport port-security violation restrict
switchport port-security aging type inactivity
端口的老化定时器到期后,在老化周期中没有流量的部分表项老化,有流量的部分依旧保留,恢复时间为10分钟
int e1/0/1
switchport port-security aging type inactivity
要注意绝对老化和相对老化的区别是:
绝对老化不会因为有流量经过而不进行清除
相对老化只要端口有流量经过 计时将被重置
端口安全违背
当超过设定MAC地址数量的最大值,不学习新的MAC、丢弃数据包、发 snmp trap、同时在sys1og日志中记
录
protect:安全违背保护模式,当该端口违反了mac地址安全,则不学习新的mac,并丢弃数据,不发送警告
resrtict:安全违背限制模式,触发违背动作后,不关闭端口,不学习新的mac,丢弃数据包,发送snmp trap,同时在syslog日志中记录。
shutdown:安全违背关闭模式,是安全违背的缺省模式,在这种情况下,端口被立即关闭,发送SNMP trap, 同时在syslog 日志中记录。
recovery:恢复违背模式,触发端口违背动作后,恢复mac学习功能
禁止采用访问控制列表,只允许IP主机位为20-50的数据包进行转发;禁止配置访问控制列表,实现端口间二
层流量无法互通,组名称FW。
cs6200-28x-EI(config)am enable
cs6200-28x-EI(config)int e1/0/3
cs6200-28x-EI(config-if-ethernet1/0/3)am port
cs6200-28x-EI(config-if-ethernet1/0/3)am ip-pool 10.10.13.2030 #允许20之后的30个
IP地址使用
cs6200-28x-EI(config)isolate-port group Fw #创建隔离组FW
cs6200-28x-EI(config)isolate-port group Fw switchport interface e1/0/23#限制端口
注:鼎星安全有对此文章的修改和解释权。如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经允许,不得任意修改或者增减此文章内容,不得以任何方式将其用于商业目的。
原文始发于微信公众号(鼎新安全):关于神州数码SW的端口安全的实验和例题拓展
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论