05-ARP安全综合功能典型配置举例
本章节下载: 05-ARP安全综合功能典型配置举例 (236.47 KB)
本文档介绍了ARP攻击防御的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解ARP攻击防御特性。
如图1所示,Device作为网关通过接口GE1/0/3连接一台服务器,通过接口GE1/0/1、GE1/0/2连接VLAN10和VLAN20下的四个用户。网络中存在以下ARP威胁:
· 用户Host A向Device发送伪造的ARP报文、伪造的免费ARP报文进行ARP欺骗攻击,恶意修改Device的ARP表项,造成其他用户无法正常接收数据报文。
· Host B因为业务需求可能会向Device发送大量ARP报文,要求在配置防攻击功能时不会错误地过滤掉Host B的报文。
· 用户Host C向Device发送大量目标IP地址不能解析的IP报文来攻击Device,造成如下危害:
¡ Device的CPU进程繁忙,影响到正常业务的处理。
¡ Device向目的网段发送大量ARP请求报文,加重目的网段的负载。
· 用户Host D构造大量源IP地址变化MAC地址固定的ARP报文进行ARP泛洪攻击,造成Device的ARP表资源被耗尽以及CPU进程繁忙,影响到正常业务的处理。
管理员希望能够防止上述ARP攻击行为,为用户提供更安全的网络环境和更稳定的网络服务。
图1 ARP安全综合功能典型配置组网图
本举例是在R2825版本上进行配置和验证的。
采用如下思路在Device上进行配置:
· 配置ARP黑洞路由功能以及严格模式的ARP主动确认功能,实现防止Host A伪造的ARP报文错误地更新Device的ARP表项。
· 关闭免费ARP报文学习功能,实现防止Host A伪造的免费ARP报文错误地更新设备ARP表项。
· 开启ARP源地址抑制功能并设置源抑制的阈值,防止用户Host C向Device发送大量目标IP地址不能解析的IP报文来进行攻击。
· 开启ARP报文限速功能并指定限速速率,Host C发送的大量源IP地址固定的ARP报文形成的ARP泛洪攻击时,Device会丢弃超过限速部分的报文,从而避免CPU进程繁忙。
· 配置接口学习动态ARP表项的最大数目,避免接口下的用户占用过多的ARP资源。
· 配置源MAC地址固定的ARP攻击检测功能,实现防止Host D发送的大量源IP地址变化MAC地址固定的ARP报文形成的ARP泛洪攻击,避免Device的ARP表资源被耗尽,并避免CPU进程繁忙。同时配置源MAC固定攻击检查的保护MAC地址为Host B的MAC地址,防止Host B的报文被错误的过滤。
配置严格模式的ARP主动确认功能时,只有ARP黑洞路由功能处于开启状态,ARP主动确认功能才能生效。
关闭免费ARP报文学习功能后,设备不会根据收到的免费ARP报文来新建ARP表项,但是会更新已存在的对应ARP表项。如果用户不希望通过免费ARP报文来新建ARP表项,可以关闭免费ARP报文学习功能,以节省ARP表项资源。
配置源MAC地址固定的ARP攻击检测表项的检测周期时:
· 当网络环境攻击较多时,建议配置较小的检测周期,便于及时发现源MAC地址固定的ARP攻击。否则,可以配置较大的检测周期。
· 多次配置源MAC地址固定的ARP攻击检测表项的检测周期,只有最后一次的配置生效。
# 配置HundredGigE1/0/1、HundredGigE1/0/2以及HundredGigE1/0/3为二层接口。
<Device> system-view
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1]port link-mode bridge
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2]port link-mode bridge
[Device-HundredGigE1/0/2] quit
[Device] interface hundredgige 1/0/3
[Device-HundredGigE1/0/3]port link-mode bridge
[Device-HundredGigE1/0/3] quit
# 创建VLAN 10,配置VLAN接口的IP地址为10.1.1.1/24,并向VLAN 10中添加端口HundredGigE1/0/1。
[Device] vlan 10
[Device-vlan10] port hundredgige 1/0/1
[Device-vlan10] quit
[Device] interface vlan-interface 10
[Device-Vlan-interface10] ip address 10.1.1.1 255.255.255.0
[Device-Vlan-interface10] quit
# 创建VLAN 20,配置VLAN接口的IP地址为10.1.2.1/24,并向VLAN 20中添加端口HundredGigE1/0/2。
[Device] vlan 20
[Device-vlan20] port hundredgige 1/0/2
[Device-vlan20] quit
[Device] interface vlan-interface 20
[Device-Vlan-interface20] ip address 10.1.2.1 255.255.255.0
[Device-Vlan-interface20] quit
# 创建VLAN 30,配置VLAN接口的IP地址为10.1.3.1/24,并向VLAN 30中添加端口HundredGigE1/0/3。
[Device] vlan 30
[Device-vlan30] port hundredgige 1/0/3
[Device-vlan30] quit
[Device] interface vlan-interface 30
[Device-Vlan-interface30] ip address 10.1.3.1 255.255.255.0
<Device> system-view
[Device] arp resolving-route enable
<Device> system-view
[Device] arp active-ack strict enable
<Device> system-view
[Device] undo gratuitous-arp-learning enable
<Device> system-view
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] arp max-learning-num 20
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] arp max-learning-num 20
<Device> system-view
[Device] interface hundredgige 1/0/1
[Device-HundredGigE1/0/1] arp rate-limit 50
[Device-HundredGigE1/0/1] quit
[Device] interface hundredgige 1/0/2
[Device-HundredGigE1/0/2] arp rate-limit 50
<Device> system-view
[Device] arp source-suppression enable
[Device] arp source-suppression limit 40
# 开启源MAC固定ARP攻击检测功能,并选择过滤模式。
<Device> system-view
[Device] arp source-mac filter
# 配置源MAC地址固定的ARP攻击检测表项的检测周期为10秒。
[Device] arp source-mac check-interval 10
# 配置源MAC固定ARP报文攻击检测阈值为30个。
[Device] arp source-mac threshold 30
# 配置源MAC地址固定的ARP攻击检测表项的老化时间为60秒。
[Device] arp source-mac aging-time 60
# 配置源MAC固定攻击检查的保护MAC地址为Host B的MAC地址。
[Device] arp source-mac exclude-mac 0c68-d691-0606
# 显示当前ARP源抑制的配置信息,可以看到ARP源抑制功能已开启,且设备在5秒时间间隔内可以接收到的源IP相同,但目的IP地址不能解析的IP报文的最大数目为40。
<Device> display arp source-suppression
ARP source suppression is enable
Current suppression limit: 40
# 当Host D在5秒内向Device发送的ARP请求报文数目超过30时,可以通过如下命令查看到Host D的ARP攻击检测表项。使Host D向Device发送ARP请求报文,无法建立Host D的ARP表项。
<Device> display arp source-mac
Source-MAC VLAN ID Interface Aging time (sec) Packets dropped
0c68-be82-0206 20 GE1/0/2 10 244
<Device> display arp
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
# 当Host B在5秒内向Device发送的ARP请求报文数目超过30时,通过如下命令查看ARP攻击检测表项,发现没有Host B对应的攻击检测表项。使Host B向Device发送ARP请求报文,成功建立Host B的ARP表项。
<Device> display arp source-mac
Source-MAC VLAN ID Interface Aging time (sec) Packets dropped
<Device> display arp
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
10.1.1.3 0c68-d691-0606 10 GE1/0/1 1197 D
# 当Host D停止向Device发送ARP报文,且Host D对应的攻击检测表项到达老化时间后,再使Host D向Device发送ARP请求报文,成功建立Host D的ARP表项。
<Device> display arp
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
10.1.1.3 0c68-d691-0606 10 GE1/0/1 944 D
10.1.2.3 0c68-be82-0206 10 GE1/0/2 1195 D
#
vlan 1
#
vlan 10
#
vlan 20
#
vlan 30
#
interface Vlan-interface10
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface20
ip address 10.1.2.1 255.255.255.0
#
interface Vlan-interface30
ip address 10.1.3.1 255.255.255.0
#
interface HundredGigE1/0/1
port link-mode bridge
port access vlan 10
combo enable copper
arp max-learning-num 20
arp rate-limit 50
#
interface HundredGigE1/0/2
port link-mode bridge
port access vlan 20
combo enable copper
arp max-learning-num 20
arp rate-limit 50
#
interface HundredGigE1/0/3
port link-mode bridge
port access vlan 30
combo enable copper
#
undo gratuitous-arp-learning enable
arp source-mac filter
arp source-mac aging-time 60
arp source-mac exclude-mac 0c68-d691-0606
arp source-mac check-interval 10
arp active-ack strict enable
arp source-suppression enable
arp source-suppression limit 40
· H3C S12500X-AF系列以太网交换机 ACL和QoS配置指导-R28XX系列
· H3C S12500X-AF系列以太网交换机 ACL和QoS命令参考-R28XX系列
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!