局域网网络安全

2020/12/24 07:35
阅读数 156

局域网网络安全

背景:

利用交换机保障网络安全
局域网内部,面临着两个风险,计算机病毒的扩散和内部人员的恶意
内网安全可以防止mac泛洪,dhcp欺骗,arp中间人
,ip源地址欺骗,避免合法用户的数据被中间人窃取。

目的:

1 配置交换机端口安全,通过端口限制学习到的mac地址数量,限制了mac地址泛洪
2 配置交换机dhcp snooping,通过设置LSW1上联口4口味trust口后才转发dhcp报文;
3 配置交换机的动态arp检测功能,使LSW1对收到的arp报文对应的sip,smac,vlan以及接口信息进行dhcp snoop绑定表匹配检查,防止中间人


4 配置交换机的ip源防护功能,使LSW1对收到的ip报文进行sip,smac,vlan以及接口信息进行dhcp snooping绑定表项匹配检查,防止源ip地址欺骗***。

配置命令:

1、 LSW1上配置端口安全

interface GigabitEthernet0/0/1
port-security enable          //开启端口安全
port-security max-mac-num 1   //学习最大mac地址数是1
port-security protect-action restrict   //当超过mac地址的数量,丢弃源mac地址并上报警告。

interface GigabitEthernet0/0/2
port-security enable
port-security max-mac-num 1
port-security protect-action restrict 

interface GigabitEthernet0/0/3
port-security enable
port-security max-mac-num 1
port-security protect-action restrict 

2、配置dhcp snooping
LSW1:

dhcp enable 
dhcp snooping enable  //全局开启dhcp snooping
interface GigabitEthernet0/0/1
dhcp snooping enable

interface GigabitEthernet0/0/2
dhcp snooping enable

interface GigabitEthernet0/0/3
dhcp snooping enable

interface GigabitEthernet0/0/4  //上联到dhcp服务器需要转发dhcp报文,默认untrust。
dhcp snooping enable
dhcp snooping trust

dis dhcp snooping configuration //查看dhcp snooping的配置

3、启用动态arp检测,防止arp中间人***
LSW1:

interface GigabitEthernet0/0/1
arp anti-attack check user-bind enable
arp anti-attack check user-bind check-item ip-address mac-address vlan

interface GigabitEthernet0/0/2
arp anti-attack check user-bind enable
arp anti-attack check user-bind check-item ip-address mac-address vlan 

interface GigabitEthernet0/0/3
arp anti-attack check user-bind enable
arp anti-attack check user-bind check-item ip-address mac-address vlan 

4、启用IP source guard
LSW1:

interface GigabitEthernet0/0/1
ip source check user-bind enable
ip source check user-bind check-item ip-address mac-address vlan 

interface GigabitEthernet0/0/2
ip source check user-bind enable
ip source check user-bind check-item ip-address mac-address vlan 

interface GigabitEthernet0/0/3
ip source check user-bind enable
ip source check user-bind check-item ip-address mac-address vlan 

display ip source check user-bind interface g 0/0/1 //检查反IP欺骗配置

display arp anti-attack configuration check user-bind interface g0/0/1 //检查反arp欺骗配置

dis dhcp snooping user-bind all //查看dhcp snooping信息

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部