动态 ARP 检测
目录
1. 特性简介 1
1.1 动态 ARP 检测特性 1
1.2 IP 过滤特性 1
2. 特性的优点 1
2.1 动态 ARP 检测特性优点 1
2.2 IP 过滤特性优点 1
3. 版本历史记录 1
4. 使用指南 1
4.1 使用场合 1
4.2 配置步骤 2
4.2.1 动态 ARP 检测配置步骤 2
4.2.2 IP 过滤配置步骤 2
4.3 配置举例 2
4.3.1 动态 ARP 检测配置举例 2
4.3.2 IP 过滤配置举例 3
4.4 注意事项 3
5. 相关命令 3
5.1 ARP 检测模块配置命令 3
5.1.1 配置 ARP 检测使能 3
5.1.2 配置 ARP 检测信任端口功能 4
5.1.3 ARP 检测调试指令 4
5.2 IP 过滤模块配置命令 4
5.2.1 配置 IP 过滤命令 4
5.2.2 配置 IP 过滤调试命令 5
5.2.3 配置 IP 过滤静态绑定命令 5
5.2.4 显示 IP 地址过滤绑定表命令 5
1. 特性简介
1.1 动态 ARP 检测特性
为了防止黒客或攻击者通过ARP报文实施欺骗行为,将经过交换机的所有 ARP(请求与回应)报文重定向到CPU,由上层软件去进行合法性检测并转发;如果源IP源MAC、端口号和valn id在Snooping表项或者静态绑定表中,则认为合法,进行正常处理或转发,否则认为是非 法ARP报文,丢弃,并通过debug 信息给出提示。同时该模块还支持信任端口和非信任端口(考虑聚合端口组处理,具体参见详细设计文档),如果端口被配置为信任端口,则在该端口不进行ARP检测,否则进行ARP检测。
1.2 IP 过滤特性
为防止黑客仿冒他人 IP/MAC 进行攻击,需下发 ACL 由硬件判断 IP 报文 IP、MAC 和 vlan id 对应关系是否在 Snooping 表项或者静态绑定表中,合法则允许通过,否则直接丢弃,端口初始 使能 IP 过滤时,规则为丢弃所有 IP 报文,同时此功能也要考虑聚合端口组的处理。
2. 特性的优点
2.1 动态 ARP 检测特性优点
开启 ARP 检测功能,可以有效防止网络中常见的 ARP 欺骗攻击,同时也可以轻松限制非 法网络用户访问网络的权限。
2.2 IP 过滤特性优点
开启 IP 过滤功能,直接将非法 IP/MAC 报文丢弃,可以有效防止 IP/MAC 欺骗。报文合法 性判断由硬件直接处理,效率高,占用系统资源少。
3. 版本历史记录
表1、版本历史记录表

4. 使用指南
4.1 使用场合
任意情况下都可以使用上述特性。
4.2 配置步骤
4.2.1 动态 ARP 检测配置步骤
表2、 配置步骤

4.2.2 IP 过滤配置步骤
表3、 配置步骤

4.3 配置举例
4.3.1 动态 ARP 检测配置举例
(1)组网及应用需求
一般在做接入层的设备上启用动态 ARP 检测功能,能够有效防止 ARP 欺骗。
(2)配置过程
Quidway sy Quidway system-view
Enter system view, return to user view with Ctrl+Z. [Quidway]vlan 1
[Quidway-vlan1]arp detection enable(在 vlan 上使能 ARP 检测功能)
[Quidway]interface e0/1
[Quidway-Ethernet0/1]arp detection trust(将端口设为信任端口)
4.3.2 IP 过滤配置举例
(1)组网及应用需求
一般在接入层设备开启 IP 过滤功能,能够有效防止 IP/MAC 欺骗。
(2)配置过程
Quidway system-view
Enter system view, return to user view with Ctrl+Z. [Quidway]interface e0/1 [Quidway-Ethernet0/1]ip check source ip-address mac-address(在端口上使能 IP
过滤功能)
[Quidway-Ethernet0/1]ip source static binding ip-address 1.1.1.1 vlan 1 mac-address
2-2-2 (在端口上绑定静态表项)
4.4 注意事项
当开启动态 ARP 检测时,需要关闭发送免费 ARP 功能,否则有可能造成安全隐患。
当IP过滤开启时,初始状态是deny所有IP报文,包括DHCP报文。当使能DHCP SNOOPING功能之后,允许所有的DHCP报文通过,并且所有的IP报文根据动态表项 和静态表项是否存在来决定该报文是否被允许通过,存在则允许通过。
5. 相关命令
5.1 ARP 检测模块配置命令
5.1.1 配置 ARP 检测使能
【命令】 arp detection enable
Undo arp detection enable 【视图】
vlan 视图
【参数】
无
【描述】
arp detection enable 命令用来在某个 VLAN 上使能 ARP 检测的功能。对于源IP/MAC 不在snooping 表项中的ARP 报文将予以丢弃。undo arp detection enable命令用来取消某个 VLAN 的 ARP 检测功能。缺省情况下,为不使能。
5.1.2 配置 ARP 检测信任端口功能
【命令】
arp detection trust undo arp detection trust 【视图】
端口视图
【参数】
无
【描述】
arp detection trust 命令用来在某个端口上使能 ARP 检测的信任端口功能,对于此 端口上来的 ARP 报文将不做检测。undo arp detection trust 命令用来取消某个端 口的 ARP 检测信任端口功能。缺省情况下,为不使能。
5.1.3 ARP 检测调试指令
【命令】
debugging arp detection event undo debugging arp detection event
【视图】
用户视图。
【参数】
无
【描述】
debugging arp detection event 命令用来开启 ARP 检测的 debug 功能。 undo debugging arp detection event 命令用来关闭 ARP 检测的 debug 功能。缺省情况下,为不使能。
5.2 IP 过滤模块配置命令
5.2.1 配置 IP 过滤命令
【命令】 ip check source ip-address [ mac-address ]
undo ip check source ip-address [ mac-address ]
【视图】
端口视图
【参数】
无
【描述】
ip check source ip-address 命令用来配置端口下对 IP 报文的源 IP 地址进行过滤 的功能;ip check source ip-address mac-address 命令用来配置端口下对报文的 源 IP 及 MAC 地址的过滤功能;undo ip check source ip-address 命令用来取消 端口下对 IP 报文的源 IP 地址的过滤功能;undo ip check source ip-address mac-address 命令用来取消端口下对 IP 报文的源 IP 及 MAC 地址的过滤功能。缺 省情况下为不使能。
5.2.2 配置 IP 过滤调试命令
【命令】
debugging ip check event undo debugging ip check event
【视图】
用户视图
【参数】
无
【描述】
debugging ip check event 命令用来打开 IP 过滤功能的调试开关;undo debugging ip check event 命令用来关闭 IP 过滤功能的调试开关。缺省情况下, 为不使能。
5.2.3 配置 IP 过滤静态绑定命令
【命令】
ip source static binding ip-address x.x.x.x mac-address x-x-x vlan vlanid
undo ip source static binding ip-address x.x.x.x
【视图】
用户视图
【参数】
x.x.x.x (ip-address): 要静态绑定 IP 地址
x-x-x (mac-address): 要静态绑定的 MAC 地址
vlanid :要静态绑定的 vlan 号
【描述】
ip source static binding ip-address x.x.x.x mac-address x-x-x vlan vlanid 命令用来配置静态绑定关系;undo ip source static binding ip-address x.x.x.x 命令用 来取消静态绑定关系。缺省情况下,为不使能。
5.2.4 显示 IP 地址过滤绑定表命令
【命令】
display ip source static binding [ vlan vlanid | interface interface ]
【视图】
所有视图
【参数】
vlanid:需要显示的 VLAN
interface:需要显示的端口
【描述】
display ip source static binding 命令用来显示用户配置的静态绑定表
display ip source static binding vlan vlanid 命令用来按 VLAN 显示静态绑定表
display ip source static binding interface interface 命令用来按端口显示静态绑定表