• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

12-安全命令参考

目录

14-ARP攻击防御命令

本章节下载 14-ARP攻击防御命令  (324.30 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/SR_Router/SR8800-F/Command/Command_Manual/H3C_SR8800-F_CR-R7951PXX-6W102/12/202011/1358660_30005_0.htm

14-ARP攻击防御命令

  录

1 ARP攻击防御

1.1 ARP防止IP报文攻击配置命令

1.1.1 arp resolving-route enable

1.1.2 arp resolving-route probe-count

1.1.3 arp resolving-route probe-interval

1.1.4 arp source-suppression enable

1.1.5 arp source-suppression limit

1.1.6 display arp source-suppression

1.2 源MAC地址固定的ARP攻击检测配置命令

1.2.1 arp source-mac

1.2.2 arp source-mac aging-time

1.2.3 arp source-mac check-interval

1.2.4 arp source-mac exclude-mac

1.2.5 arp source-mac threshold

1.2.6 display arp source-mac

1.2.7 display arp source-mac configuration

1.2.8 display arp source-mac statistics

1.2.9 reset arp source-mac

1.2.10 reset arp source-mac statistics

1.3 ARP报文源MAC地址一致性检查配置命令

1.3.1 arp valid-check enable

1.3.2 display arp valid-check statistics

1.3.3 reset arp valid-check statistics

1.4 ARP主动确认配置命令

1.4.1 arp active-ack enable

1.5 ARP接口攻击抑制命令

1.5.1 arp attack-suppression check-interval

1.5.2 arp attack-suppression enable per-interface

1.5.3 arp attack-suppression suppression-time

1.5.4 arp attack-suppression threshold

1.5.5 display arp attack-suppression configuration

1.5.6 display arp attack-suppression per-interface

1.5.7 display arp attack-suppression per-interface inteface

1.5.8 reset arp attack-suppression per-interface

1.5.9 reset arp attack-suppression per-interface statistics

1.6 授权ARP配置命令

1.6.1 arp authorized enable

1.7 ARP自动扫描、固化配置命令

1.7.1 arp fixup

1.7.2 arp scan

1.8 ARP网关保护配置命令

1.8.1 arp filter source

1.9 ARP过滤保护配置命令

1.9.1 arp filter binding

1.10 ARP报文发送端IP地址检查功能

1.10.1 arp sender-ip-range

 


1 ARP攻击防御

1.1  ARP防止IP报文攻击配置命令

1.1.1  arp resolving-route enable

arp resolving-route enable命令用来开启ARP黑洞路由功能。

undo arp resolving-route enable命令用来关闭ARP黑洞路由功能。

【命令】

arp resolving-route enable

undo arp resolving-route enable

【缺省情况】

ARP黑洞路由功能处于开启状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

建议在网关设备上开启本功能。

【举例】

# 开启ARP黑洞路由功能。

<Sysname> system-view

[Sysname] arp resolving-route enable

【相关命令】

·     arp resolving-route probe-count

·     arp resolving-route probe-interval

1.1.2  arp resolving-route probe-count

arp resolving-route probe-count命令用来配置发送ARP请求报文的次数。

undo arp resolving-route probe-count命令用来恢复缺省情况。

【命令】

arp resolving-route probe-count count

undo arp resolving-route probe-count

【缺省情况】

发送ARP请求报文的次数为3次。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

count:发送ARP请求报文的次数,取值范围为1~25。

【举例】

# 配置发送ARP请求报文的次数为5次。

<Sysname> system-view

[Sysname] arp resolving-route probe-count 5

【相关命令】

·     arp resolving-route enable

·     arp resolving-route probe-interval

1.1.3  arp resolving-route probe-interval

arp resolving-route probe-interval命令用来配置发送ARP请求报文的时间间隔。

undo arp resolving-route probe-interval命令用来恢复缺省情况。

【命令】

arp resolving-route probe-interval interval

undo arp resolving-route probe-interval

【缺省情况】

发送ARP请求报文的时间间隔是1秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

interval:发送ARP请求报文的时间间隔,取值范围为1~5,单位为秒。

【举例】

# 配置发送ARP请求报文的时间间隔为3秒。

<Sysname> system-view

[Sysname] arp resolving-route probe-interval 3

【相关命令】

·     arp resolving-route enable

·     arp resolving-route probe-count

1.1.4  arp source-suppression enable

arp source-suppression enable命令用来开启ARP源地址抑制功能。

undo arp source-suppression enable命令用来关闭ARP源地址抑制功能。

【命令】

arp source-suppression enable

undo arp source-suppression enable

【缺省情况】

ARP源地址抑制功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

建议在网关设备上开启本功能。

【举例】

# 开启ARP源地址抑制功能。

<Sysname> system-view

[Sysname] arp source-suppression enable

【相关命令】

·     display arp source-suppression

1.1.5  arp source-suppression limit

arp source-suppression limit命令用来配置ARP源抑制的阈值。

undo arp source-suppression limit命令用来恢复缺省情况。

【命令】

arp source-suppression limit limit-value

undo arp source-suppression limit

【缺省情况】

ARP源抑制的阈值为10。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

limit-value:ARP源抑制的阈值,即设备在5秒间隔内可以处理的源IP相同,但目的IP地址不能解析的IP报文的最大数目,取值范围为2~1024。

【使用指导】

如果网络中每5秒内从某IP地址向设备某接口发送目的IP地址不能解析的IP报文超过了设置的阈值,则设备将不再处理由此IP地址发出的IP报文直至该5秒结束,从而避免了恶意攻击所造成的危害。

【举例】

# 配置ARP源抑制的阈值为100。

<Sysname> system-view

[Sysname] arp source-suppression limit 100

【相关命令】

·     display arp source-suppression

1.1.6  display arp source-suppression

display arp source-suppression命令用来显示当前ARP源抑制的配置信息。

【命令】

display arp source-suppression

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示当前ARP源抑制的配置信息。

<Sysname> display arp source-suppression

 ARP source suppression is enabled

 Current suppression limit: 100

表1-1 display arp source-suppression显示信息描述表

字段

描述

ARP source suppression is enabled

ARP源抑制功能处于开启状态

Current suppression limit

设备在5秒时间间隔内可以接收到的源IP相同,但目的IP地址不能解析的IP报文的最大数目

 

1.2  源MAC地址固定的ARP攻击检测配置命令

1.2.1  arp source-mac

arp source-mac命令用来开启源MAC地址固定的ARP攻击检测功能,并选择检查模式。

undo arp source-mac命令用来关闭源MAC地址固定的ARP攻击检测功能。

【命令】

arp source-mac { filter | monitor }

undo arp source-mac [ filter | monitor ]

【缺省情况】

源MAC地址固定的ARP攻击检测功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

filter:配置检查方式为过滤模式。

monitor:配置检查方式为监控模式。

【使用指导】

建议在网关设备上开启本功能。

本特性根据ARP报文的源MAC地址对上送CPU的ARP报文进行统计,在一个检测周期内,如果收到同一源MAC地址(源MAC地址固定)的ARP报文超过一定的阈值,则认为存在攻击,系统会将此MAC地址添加到攻击检测表项中。当开启了ARP日志信息功能(配置arp check log enable命令),且在该攻击检测表项老化之前,如果设置的检查模式为过滤模式,则会打印日志信息并且将该源MAC地址发送的ARP报文过滤掉;如果设置的检查模式为监控模式,则只打印日志信息,不会将该源MAC地址发送的ARP报文过滤掉。关于ARP日志信息功能的详细描述,请参见“三层技术-IP业务配置指导”中的“ARP”。

如果undo arp source-mac命令中未指定检查模式,则关闭任意检查模式的源MAC地址固定的ARP攻击检测功能。

【举例】

# 开启源MAC地址固定的ARP攻击检测功能,并选择filter检查模式。

<Sysname> system-view

[Sysname] arp source-mac filter

1.2.2  arp source-mac aging-time

arp source-mac aging-time命令用来配置源MAC地址固定的ARP攻击检测表项的老化时间。

undo arp source-mac aging-time命令用来恢复缺省情况。

【命令】

arp source-mac aging-time time

undo arp source-mac aging-time

【缺省情况】

源MAC地址固定的ARP攻击检测表项的老化时间为300秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

time:源MAC地址固定的ARP攻击检测表项的老化时间,取值范围为60~6000,单位为秒。

【举例】

# 配置源MAC地址固定的ARP攻击检测表项的老化时间为60秒。

<Sysname> system-view

[Sysname] arp source-mac aging-time 60

1.2.3  arp source-mac check-interval

arp source-mac check-interval命令用来配置源MAC地址固定的ARP攻击检测功能的检测周期。

undo arp source-mac check-interval命令用来恢复缺省情况。

【命令】

arp source-mac check-interval interval

undo arp source-mac check-interval

【缺省情况】

源MAC地址固定的ARP攻击检测功能的检测周期为5秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

interval:检测周期,取值范围为5~60,单位为秒。

【使用指导】

源MAC地址固定的ARP攻击检测功能根据ARP报文的源MAC地址对上送CPU的ARP报文进行统计,在本命令指定的检测周期内,如果收到同一源MAC地址(源MAC地址固定)的ARP报文超过源MAC地址固定的ARP报文攻击检测阈值,则认为存在攻击,系统会将此MAC地址添加到攻击检测表项中。

当网络环境攻击较多时,建议配置较小的检测周期,便于及时发现源MAC地址固定的ARP攻击。否则,可以配置较大的检测周期。

多次执行本命令,最后一次执行的命令生效。

【举例】

# 配置源MAC地址固定的ARP攻击检测功能的检测周期为30秒。

<Sysname> system-view

[Sysname] arp source-mac check-interval 30

【相关命令】

·     arp source-mac

·     display arp source-mac configuration

1.2.4  arp source-mac exclude-mac

arp source-mac exclude-mac命令用来配置保护MAC地址。当配置了保护MAC地址之后,即使该ARP报文中的MAC地址存在攻击也不会被检测过滤。

undo arp source-mac exclude-mac命令用来取消配置的保护MAC地址。

【命令】

arp source-mac exclude-mac mac-address&<1-64>

undo arp source-mac exclude-mac [ mac-address&<1-64> ]

【缺省情况】

未配置任何保护MAC地址。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

mac-address&<1-64>:MAC地址列表。其中,mac-address表示配置的保护MAC地址,格式为H-H-H。&<1-64>表示每次最多可以配置的保护MAC地址个数。

【使用指导】

如果undo命令中未指定MAC地址,则取消所有已配置的保护MAC地址。

【举例】

# 配置源MAC地址固定的ARP攻击检查的保护MAC地址为001e-1200-0213。

<Sysname> system-view

[Sysname] arp source-mac exclude-mac 001e-1200-0213

1.2.5  arp source-mac threshold

arp source-mac threshold命令用来配置源MAC地址固定的ARP报文攻击检测阈值,当在一个检测周期内收到源MAC地址固定的ARP报文超过该阈值则认为存在ARP报文攻击。

undo arp source-mac threshold命令用来恢复缺省情况。

【命令】

arp source-mac threshold threshold-value

undo arp source-mac threshold

【缺省情况】

源MAC地址固定的ARP报文攻击检测阈值为30。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

threshold-value:固定时间内源MAC地址固定的ARP报文攻击检测的阈值,单位为报文个数。取值范围为1~5000。

【举例】

# 配置源MAC地址固定的ARP报文攻击检测阈值为30个。

<Sysname> system-view

[Sysname] arp source-mac threshold 30

1.2.6  display arp source-mac

display arp source-mac命令用来显示检测到的源MAC地址固定的ARP攻击检测表项。

【命令】

(独立运行模式)

display arp source-mac interface interface-type interface-number [ slot slot-number ] [ verbose ]

display arp source-mac { mac mac-address | vlan vlan-id } slot slot-number [ verbose ]

display arp source-mac slot slot-number [ count | verbose ]

(IRF模式)

display arp source-mac interface interface-type interface-number

[ chassis chassis-number slot slot-number ] [ verbose ]

display arp source-mac { mac mac-address | vlan vlan-id } chassis chassis-number slot slot-number [ verbose ]

display arp source-mac chassis chassis-number slot slot-number [ count | verbose ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

interface interface-type interface-number:显示指定接口检测到的源MAC地址固定的ARP攻击检测表项,interface-type interface-number表示指定接口的类型和编号。

slot slot-number:显示虚拟接口包含的指定单板上的物理口检测到的源MAC地址固定的ARP攻击检测表项。slot-number表示单板所在的槽位号。如果未指定本参数,则显示的是虚拟接口包含的主用主控板上的物理口检测到的源MAC地址固定的ARP攻击检测表项。(独立运行模式)

chassis chassis-number slot slot-number:显示虚拟接口包含的指定成员设备上指定单板上的物理口检测到的源MAC地址固定的ARP攻击检测表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,则显示虚拟接口包含的全局主用主控板上的物理口检测到的源MAC地址固定的ARP攻击检测表项。(IRF模式)

mac mac-address:显示指定MAC对应的源MAC地址固定的ARP攻击检测表项。mac-address格式为H-H-H。

vlan vlan-id显示指定VLAN内检测到的源MAC地址固定的ARP攻击检测表项,取值范围为1~4094。vlan-id的取值范围为1~4094。

slot slot-number:显示指定单板检测到的源MAC地址固定的ARP攻击检测表项。slot-number表示单板所在的槽位号。如果未指定本参数,则显示主用主控板检测到的源MAC地址固定的ARP攻击检测表项。(独立运行模式)

chassis chassis-number slot slot-number:显示指定成员设备上指定单板检测到的源MAC地址固定的ARP攻击检测表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。如果未指定本参数,则显示全局主用主控板上检测到的源MAC地址固定的ARP攻击检测表项。(IRF模式)

verbose:显示检测到的源MAC地址固定的ARP攻击检测表项的详细信息。如果未指定本参数,则显示的是检测到的源MAC地址固定的ARP攻击检测表项的简要信息。

count:指定本参数后,只显示检测到的源MAC地址固定的ARP攻击检测表项的数目。如果未指定本参数,则显示的是检测到的源MAC地址固定的ARP攻击检测表项。

【使用指导】

显示虚拟接口检测到的源MAC地址固定的ARP攻击检测表项时,才支持输入slot参数;显示物理口检测到的源MAC地址固定的ARP攻击检测表项时,不支持输入slot参数。(独立运行模式)

显示虚拟接口检测到的源MAC地址固定的ARP攻击检测表项时,才支持输入chassisslot参数;显示物理口检测到的源MAC地址固定的ARP攻击检测表项时,不支持输入chassisslot参数。(IRF模式)

虚拟接口支持二层聚合接口、三层聚合接口、三层聚合子接口、VXLAN中的VSI虚接口。

如果未指定任何参数,则显示所有检测到的源MAC地址固定的ARP攻击检测表项。

【举例】

# 显示接口GigabitEthernet3/1/1上检测到的源MAC地址固定的ARP攻击检测表项。

<Sysname> display arp source-mac interface gigabitethernet 3/1/1

Source MAC     VLAN ID Interface                Aging time (sec) Packets dropped

23f3-1122-3344 4094    GE3/1/1                  10

               18446744073709551615

# 显示slot 3上检测到的源MAC地址固定的ARP攻击检测表项个数。

<Sysname> display arp source-mac slot 3 count

Total source MAC-based ARP attack detection entries: 1

# 显示接口GigabitEthernet3/1/1检测到的源MAC地址固定的ARP攻击检测表项的详细信息。

<Sysname> display arp source-mac interface gigabitethernet 3/1/1 verbose

Source MAC: 0001-0001-0001

VLAN ID: 4094

Hardware status: Succeeded

Aging time: 10 seconds

Interface: GigabitEthernet3/1/1

Attack time: 2018/06/04 15:53:34

Packets dropped: 18446744073709551615

表1-2 display arp source-mac命令显示信息描述表

字段

描述

Source MAC

检测到攻击的源MAC地址

VLAN ID

检测到攻击的VLAN ID

Interface

检测到攻击的接口

Aging time

源MAC地址固定的ARP攻击检测功能的剩余老化时间,单位为秒

Packets dropped

丢包总个数,如果受到攻击的接口是二层以太网接口,则不支持统计丢包总个数,显示为1

Total source MAC-based ARP attack detection entries

源MAC地址固定的ARP攻击检测表项的个数

Hardware status

表项下硬件状态,取值包括:

·     Succeeded:成功

·     Failed:失败

·     Not supported:不支持

·     Not enough resources:资源不足

Attack time

检测到攻击的起始时间(显示方式如2018/06/04 15:53:34)

 

【相关命令】

·     reset arp source-mac

·     reset arp source-mac statistics

1.2.7  display arp source-mac configuration

display arp source-mac configuration命令用来显示源MAC地址固定的ARP攻击检测功能的配置信息。

【命令】

display arp source-mac configuration

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示源MAC固定的ARP攻击检测功能的配置信息。

<Sysname> display arp source-mac configuration

ARP source-mac is enabled.

Mode: Filter        Check interval: 5 seconds

Threshold: 20       Aging time: 300 seconds

<Sysname> display arp source-mac configuration

ARP source-mac is disabled.

表1-3 display arp source-mac configuration命令显示信息描述表

字段

描述

ARP source-mac is enabled.

源MAC地址固定的ARP攻击检测功能处于开启状态

ARP source-mac is disabled.

源MAC地址固定的ARP攻击检测功能处于关闭状态

Mode

源MAC地址固定的ARP攻击检测模式,取值包括:

·     Filter:过滤模式

·     Moniter:监控模式

Check interval

源MAC地址固定的ARP攻击检测周期,单位为秒

Threshold

源MAC地址固定的ARP攻击检测的阈值

Aging time

源MAC地址固定的ARP攻击检测表项的老化时间,单位为秒

 

【相关命令】

·     arp source-mac

·     arp source-mac aging-time

·     arp source-mac check-interval

·     arp source-mac exclude-mac

·     arp source-mac threshold

1.2.8  display arp source-mac statistics

display arp source-mac statistics命令用来显示ARP攻击检测功能丢弃的源MAC地址固定的ARP攻击报文计数统计信息。

【命令】

(独立运行模式)

display arp source-mac statistics slot slot-number

(IRF模式)

display arp source-mac statistics chassis chassis-number slot slot-number

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:显示指定单板的计数统计信息。slot-number表示单板的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:显示指定成员设备上指定单板的计数统计信息。chassis-number表示设备在IRF中的成员编号。slot-number表示单板的槽位号。(IRF模式)

【使用指导】

仅CSPEX类单板(CSPEX-1204和CSPEX-1104-E除外)支持该显示命令。

【举例】

# 显示slot 3上ARP攻击检测功能丢弃的源MAC地址固定的ARP攻击报文计数统计信息。

<Sysname> display arp source-mac statistics slot 3

Dropped ARP packets:123321

表1-4 display arp source-mac statistics命令显示信息描述表

字段

描述

Dropped ARP packets

被丢弃的源MAC固定的ARP攻击报文数

 

【相关命令】

·     arp source-mac

1.2.9  reset arp source-mac

reset arp source-mac命令用来清除源MAC地址固定的ARP攻击表项。

【命令】

(独立运行模式)

reset arp source-mac [ interface interface-type interface-number | mac mac-address | vlan vlan-id ] [ slot slot-number ]

(IRF模式)

reset arp source-mac [ interface interface-type interface-number | mac mac-address | vlan vlan-id ] [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

interface interface-type interface-number清除指定接口上的源MAC地址固定的ARP攻击检测表项。interface-type interface-number表示接口类型和接口编号。

mac mac-address清除指定MAC地址对应的源MAC地址固定的ARP攻击检测表项mac-address格式为H-H-H。

vlan vlan-id:清除指定VLAN内的源MAC地址固定的ARP攻击检测表项vlan-id的取值范围为1~4094。

slot slot-number:清除指定单板的MAC地址固定的ARP攻击检测表项slot-number表示单板所在的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:清除指定成员设备上指定单板的MAC地址固定的ARP攻击检测表项chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(IRF模式)

【使用指导】

如果未指定任何参数,则表示清除设备上所有MAC地址固定的ARP攻击检测表项。

【举例】

# 清除设备上所有的源MAC地址固定的ARP攻击检测表项

<Sysname> reset arp source-mac

【相关命令】

·     display arp source-mac

1.2.10  reset arp source-mac statistics

reset arp source-mac statistics命令用来清除源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。

【命令】

(独立运行模式)

reset arp source-mac statistics [ interface interface-type interface-number | mac mac-address | vlan vlan-id ] [ slot slot-number ]

(IRF模式)}

reset arp source-mac statistics [ interface interface-type interface-number | mac mac-address | vlan vlan-id ] [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

interface interface-type interface-number:清除指定接口上的MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息interface-type interface-number表示接口类型和接口编号。

mac mac-address:清除指定MAC地址对应的源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。mac-address格式为H-H-H。

vlan vlan-id:清除指定VLAN内的源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。vlan-id的取值范围为1~4094。

slot slot-number:清除指定单板的源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。slot-number表示单板所在的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:清除指定成员设备上指定单板的源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(IRF模式)

【使用指导】

如果未指定任何参数,则清除设备上所有源MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。

【举例】

# 清除设备上所有MAC地址固定的ARP攻击检测丢弃ARP攻击报文的计数统计信息。

<Sysname> reset arp source-mac statistics

【相关命令】

·     display arp source-mac statistics

1.3  ARP报文源MAC地址一致性检查配置命令

1.3.1  arp valid-check enable

arp valid-check enable命令用来开启ARP报文源MAC地址一致性检查功能。

undo arp valid-check enable命令用来关闭ARP报文源MAC地址一致性检查功能。

【命令】

arp valid-check enable

undo arp valid-check enable

【缺省情况】

ARP报文源MAC地址一致性检查功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

ARP报文源MAC地址一致性检查功能主要应用于网关设备。

开启ARP报文源MAC地址一致性检查功能后,设备会对接收的ARP报文进行检查,如果以太网数据帧首部中的源MAC地址和ARP报文中的源MAC地址不同,则丢弃该报文。

【举例】

# 开启ARP报文源MAC地址一致性检查功能。

<Sysname> system-view

[Sysname] arp valid-check enable

1.3.2  display arp valid-check statistics

display arp valid-check statistics命令用来显示ARP报文源MAC地址一致性检查功能丢弃的ARP报文计数统计信息。

【命令】

(独立运行模式)

display arp valid-check statistics slot slot-number

(IRF模式)

display arp valid-check statistics chassis chassis-number slot slot-number

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:显示指定单板的计数统计信息。slot-number表示单板的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:显示指定成员设备上指定单板的计数统计信息。chassis-number表示设备在IRF中的成员编号。slot-number表示单板的槽位号。(IRF模式)

【使用指导】

仅CSPEX类单板(CSPEX-1204和CSPEX-1104-E除外)支持该显示命令。

【举例】

# 显示slot 3上ARP报文源MAC地址一致性检查功能丢弃的ARP报文计数统计信息。

<Sysname> display arp valid-check statistics slot 3

Dropped ARP packets:123321

表1-5 display arp valid-check statistics命令显示信息描述表

字段

描述

Dropped ARP packets

源MAC地址一致性检查不通过而丢弃的ARP报文数

 

【相关命令】

·     arp valid-check enable

1.3.3  reset arp valid-check statistics

reset arp valid-check statistics命令用来清除ARP报文源MAC地址一致性检查功能丢弃的ARP报文计数统计信息。

【命令】

(独立运行模式)

reset arp valid-check statistics [ slot slot-number ]

(IRF模式)

reset arp valid-check statistics [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

slot slot-number:清除指定单板的计数统计信息。slot-number表示单板的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:清除指定成员设备上指定单板的计数统计信息。chassis-number表示设备在IRF中的成员编号。slot-number表示单板的槽位号。(IRF模式)

【举例】

# 清除设备上所有ARP报文源MAC地址一致性检查功能丢弃的ARP报文计数统计信息。

<Sysname> reset arp valid-check statistics

【相关命令】

·     display arp valid-check statistics

1.4  ARP主动确认配置命令

1.4.1  arp active-ack enable

arp active-ack enable命令用来开启ARP主动确认功能。

undo arp active-ack enable命令用来关闭ARP主动确认功能。

【命令】

arp active-ack [ strict ] enable

undo arp active-ack [ strict ] enable

【缺省情况】

ARP主动确认功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

strict:ARP主动确认功能的严格模式。

【使用指导】

ARP的主动确认功能主要应用于网关设备,防止攻击者仿冒用户欺骗网关设备。通过strict参数开启或关闭主动确认的严格模式。开启严格模式后,ARP主动确认功能执行更严格的检查,新建ARP表项前,需要本设备先对其IP地址发起ARP解析,解析成功后才能触发正常的主动确认流程,在主动确认流程成功后,才允许设备学习该表项。

【举例】

# 开启ARP主动确认功能。

<Sysname> system-view

[Sysname] arp active-ack enable

1.5  ARP接口攻击抑制命令

说明

仅CSPEX类单板(CSPEX-1204和CSPEX-1104-E除外)上的三层以太网接口和三层以太网子接口支持本特性。

 

1.5.1  arp attack-suppression check-interval

arp attack-suppression check-interval命令用来配置ARP接口攻击抑制功能的检测周期。

undo arp attack-suppression check-interval命令用来恢复缺省情况。

【命令】

arp attack-suppression check-interval interval

undo arp attack-suppression check-interval

【缺省情况】

ARP接口攻击抑制功能的检测周期为5秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

interval:ARP接口攻击抑制功能的检测周期,取值范围为5~60,单位为秒。

【使用指导】

ARP接口攻击抑制功能基于接口限制ARP请求速率,以防止非法用户构造大量ARP请求报文对设备进行ARP攻击。在配置的检测周期内,只统计设备的三层接口上收到的ARP请求报文,如果单个接口收到的ARP请求报文个数超过配置的ARP接口攻击抑制阈值,则认为该接口受到ARP攻击。

多次执行本命令,最后一次执行的命令生效。

【举例】

# 配置ARP接口攻击抑制功能的检测周期为30秒。

<Sysname> system-view

[Sysname] arp attack-suppression check-interval 30

【相关命令】

·     arp attack-suppression enable per-interface

1.5.2  arp attack-suppression enable per-interface

arp attack-suppression enable per-interface命令用来开启ARP接口攻击抑制功能。

undo arp attack-suppression enable per-interface命令用来关闭ARP接口攻击抑制功能。

【命令】

arp attack-suppression enable per-interface

undo arp attack-suppression enable per-interface

【缺省情况】

ARP接口攻击抑制功能处于关闭状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

ARP接口攻击抑制功能基于接口限制ARP请求速率,以防止非法用户构造大量ARP请求报文对设备进行ARP攻击。本功能只统计设备的三层接口上收到的ARP请求报文,在一个检测周期内,如果单个接口收到的ARP请求报文个数超过配置的ARP接口攻击抑制阈值,则认为该接口受到ARP攻击。确定受到ARP攻击后,设备会生成ARP接口攻击抑制表项,在ARP接口攻击抑制表项的抑制时间清零之前设备会限制被攻击的接口每秒钟接收ARP报文的速率,防止ARP攻击报文持续冲击CPU。如果抑制时间内ARP收包个数大于或等于一个特定值((表项抑制时间/检测周期)×抑制阈值),则设备将重置该表项的抑制时间。否则,设备删除该ARP接口攻击抑制表项。

建议在网关设备上开启本功能。

【举例】

# 开启ARP接口攻击抑制功能。

<Sysname> system-view

[Sysname] arp attack-suppression enable per-interface

【相关命令】

·     arp attack-suppression threshold

·     display arp attack-suppression per-interface

1.5.3  arp attack-suppression suppression-time

arp attack-suppression suppression-time命令用来配置ARP接口攻击抑制功能的抑制时间。

undo arp attack-suppression suppression-time命令用来恢复缺省情况。

【命令】

arp attack-suppression suppression-time time

undo arp attack-suppression suppression-time

【缺省情况】

ARP接口攻击抑制功能的抑制时间为300秒。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

time:ARP接口攻击抑制功能的抑制时间,取值范围为60~6000,单位为秒。

【使用指导】

接口确定受到ARP攻击后,会生成ARP接口攻击抑制表项,并按照本配置启动抑制定时器。在抑制时间清零之前,设备会抑制被攻击的接口每秒钟接受ARP报文的个数,防止ARP攻击报文持续冲击CPU。抑制时间清零后,如果抑制时间内ARP收包个数大于或等于一个特定值((表项抑制时间/检测周期)×抑制阈值),则设备重置该表项的抑制时间;如果小于该特定值,则设备删除该ARP接口攻击抑制表项。

多次执行本命令,最后一次执行的命令生效。

【举例】

# 配置ARP接口攻击抑制功能的抑制时间为60秒。

<Sysname> system-view

[Sysname] arp attack-suppression suppresion-time 60

【相关命令】

·     arp attack-suppression enable per-interface

1.5.4  arp attack-suppression threshold

arp attack-suppression threshold命令用来配置ARP接口攻击抑制阈值。

undo arp attack-suppression threshold命令用来恢复缺省情况。

【命令】

arp attack-suppression threshold threshold-value

undo arp attack-suppression threshold

【缺省情况】

ARP接口攻击抑制阈值为3000。

【视图】

系统视图

【缺省用户角色】

network-admin

【参数】

threshold-value:ARP接口攻击抑制阈值,即一个检测周期内可接收ARP请求报文的个数,取值范围为1~5000。

【使用指导】

当在一个检测周期内某个接口收到的ARP请求报文个数超过阈值,则认为该接口受到ARP报文攻击。

【举例】

# 配置ARP接口攻击抑制阈值为1000,即当某个接口上在一个检测周期内收到的ARP请求报文个数超过1000个,则认为该接口受到ARP报文攻击。

<Sysname> system-view

[Sysname] arp attack-suppression threshold 1000

【相关命令】

·     arp attack-suppression enable per-interface

·     display arp attack-suppression per-interface

1.5.5  display arp attack-suppression configuration

display arp attack-suppression configuration命令用来显示ARP接口攻击抑制功能的配置信息。

【命令】

display arp attack-suppression configuration

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【举例】

# 显示ARP接口攻击抑制功能的配置信息。

<Sysname> display arp attack-suppression configuration

ARP attack-suppression per-interface is enabled.

Check interval: 5 seconds      Suppression time : 300 seconds

Threshold: 3000

<Sysname> display arp attack-suppression configuration

ARP attack-suppression per-interface is disabled.

表1-6 display arp source-mac configuration命令显示信息描述表

字段

描述

ARP attack-suppression per-interface is enabled.

ARP接口攻击抑制功能处于开启状态

ARP attack-suppression per-interface is disabled.

ARP接口攻击抑制功能处于关闭状态

Check interval

ARP接口攻击抑制功能的检测周期,单位为秒

Suppression time

ARP接口攻击抑制功能的抑制时间,单位为秒

Threshold

ARP接口攻击抑制功能的检测阈值

 

【相关命令】

·     arp attack-suppression enable per-interface

1.5.6  display arp attack-suppression per-interface

display arp attack-suppression per-interface命令用来显示ARP接口攻击抑制表项。

【命令】

(独立运行模式)

display arp attack-suppression per-interface slot slot-number [ count | verbose ]

(IRF模式)

display arp attack-suppression per-interface chassis chassis-number slot slot-number [ count | verbose ]

【视图】

任意试图

【缺省用户角色】

network-admin

network-operator

【参数】

verbose:显示ARP接口攻击抑制检测表项的详细信息。如果未指定本参数,则显示ARP接口攻击抑制检测表项的简要信息。

slot slot-number:显示指定单板的ARP接口攻击抑制表项。slot-number表示单板的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:显示指定成员设备上指定单板的ARP接口攻击抑制表项。chassis-number表示设备在IRF中的成员编号。slot-number表示单板的槽位号。(IRF模式)

count:指定本参数后,只显示ARP接口攻击抑制表项的数目。如果未指定本参数,则显示的是ARP接口攻击抑制表项。

【使用指导】

如果未指定任何参数,则显示设备上所有的ARP接口攻击抑制表项的简要信息。

【举例】

# 显示Slot1上的ARP接口攻击抑制表项。

<Sysname> display arp attack-suppression per-interface interface slot 1

Interface                Suppression time (second) Packets dropped

GE3/1/1                  200                       18446744073709551615

GE3/1/2                  140                       13829384728123487362

# 显示Slot1上的ARP接口攻击抑制表项个数。

<Sysname> display arp attack-suppression per-interface slot 1 count

Total ARP attack suppression entries: 2

# 显示Slot1上的ARP接口攻击抑制表项的详细信息。

<Sysname> display arp attack-suppression per-interface interface slot 1 verbose

Interface: GigabitEthernet3/1/1

Suppression time: 200 seconds

Hardware status: Succeeded

Attack time: 2018/06/04 15:53:34

Packets dropped: 18446744073709551615

 

Interface: GigabitEthernet3/1/2

Suppression time: 140 seconds

Hardware status: Succeeded

Attack time: 2018/06/04 14:53:34

Packets dropped: 13829384728123487362

表1-7 display arp attack-suppression per-interface命令显示信息描述表

字段

描述

Interface

受到ARP攻击的接口

Suppression time (second)

抑制接口接收ARP报文的时间,单位为秒

Packets dropped

丢包总个数

Total ARP attack suppression entries

ARP接口攻击抑制表项个数

Hardware status

表项下硬件状态,取值包括:

·     Succeeded:成功

·     Failed:失败

·     Not supported:不支持

·     Not enough resources:资源不足

Suppression time

剩余抑制时间,单位为秒

Attack time

检测到攻击的起始时间(显示方式如2018/06/04 15:53:34)

 

【相关命令】

·     reset arp attack-suppression per-interface

·     reset arp attack-suppression per-interface statistics

1.5.7  display arp attack-suppression per-interface inteface

display arp attack-suppression per-interface interface命令用来显示指定接口的ARP接口攻击抑制表项。

【命令】

display arp attack-suppression per-interface interface interface-type interface-number [ verbose ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

interface-type interface-number:指定接口的接口类型和接口编号。

verbose:显示指定接口的ARP接口攻击抑制表项的详细信息。如果未指定本参数,则显示的是ARP接口攻击抑制表项的简要信息。

【举例】

# 显示接口GigabitEthernet3/1/1上的ARP接口攻击抑制表项。

<Sysname> display arp attack-suppression per-interface interface gigabitethernet 3/1/1

Interface                Suppression time (second) Packets dropped

GE3/1/1                  200                       18446744073709551615

# 显示接口GigabitEthernet3/1/1上的ARP接口攻击抑制表项的详细信息。

<Sysname> display arp attack-suppression per-interface interface gigabitethernet 3/1/1 verbose

Interface: GigabitEthernet3/1/1

Suppression time: 200 seconds

Hardware status: Succeeded

Attack time: 2018/06/04 15:53:34

Packets dropped: 18446744073709551615

表1-2 display arp attack-suppression per-interface命令显示信息描述表

字段

描述

Interface

受到ARP攻击的接口

Suppression time (second)

抑制接口接收ARP报文的时间,单位为秒

Packets dropped

丢包总个数

Hardware status

表项下硬件状态,取值包括:

·     Succeeded:成功

·     Failed:失败

·     Not supported:不支持

·     Not enough resources:资源不足

Suppression time

剩余抑制时间,单位为秒

Attack time

检测到攻击的起始时间(显示方式如2018/06/04 15:53:34)

 

【相关命令】

·     reset arp attack-suppression per-interface

·     reset arp attack-suppression per-interface statistics

1.5.8  reset arp attack-suppression per-interface

reset arp attack-suppression per-interface命令用来清除ARP接口攻击抑制表项。

【命令】

(独立运行模式)

reset arp attack-suppression per-interface [ interface interface-type interface-number ] [ slot slot-number ]

(IRF模式)

reset arp attack-suppression per-interface [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

interface interface-type interface-number:清除指定接口上的ARP接口攻击抑制表项。interface-type interface-number表示接口类型和接口编号。

slot slot-number:清除指定单板的ARP接口攻击抑制表项。slot-number表示单板所在的槽位号。(独立运行模式)

chassis chassis-number slot slot-number清除指定成员设备上指定单板的ARP接口攻击抑制表项。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(IRF模式)

【使用指导】

如果未指定任何参数,则清除设备上所有的ARP接口攻击抑制表项。

【举例】

# 清除所有的ARP接口攻击抑制表项。

<Sysname> reset arp attack-interface per-interface

【相关命令】

·     display arp attack-suppression per-interface

1.5.9  reset arp attack-suppression per-interface statistics

reset arp attack-suppression per-interface statistics命令用来清除ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。

【命令】

(独立运行模式)

reset arp attack-suppression per-interface statistics [ interface interface-type interface-number ] [ slot slot-number ]

(IRF模式)

reset arp attack-suppression per-interface statistics [ interface interface-type interface-number ] [ chassis chassis-number slot slot-number ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

interface interface-type interface-number:清除指定接口上ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。interface-type interface-number表示接口类型和接口编号

slot slot-number:清除指定单板上ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。slot-number表示单板所在的槽位号。(独立运行模式)

chassis chassis-number slot slot-number:清除指定成员设备上指定单板上ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(IRF模式)

【使用指导】

执行本命令后,display arp attack-suppression per-interface命令显示信息中的Packets dropped信息会清空。

如果未指定任何参数,则清除设备上所有的ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。

【举例】

# 清除ARP接口攻击抑制功能丢弃的ARP攻击报文计数统计信息。

<Sysname> reset arp attack-interface per-interface statistics

【相关命令】

·     display arp attack-suppression per-interface

1.6  授权ARP配置命令

1.6.1  arp authorized enable

arp authorized enable命令用来开启接口下的授权ARP功能。

undo arp authorized enable命令用来关闭接口下的授权ARP功能。

【命令】

arp authorized enable

undo arp authorized enable

【缺省情况】

接口下的授权ARP功能处于关闭状态。

【视图】

三层以太网接口视图/三层以太网子接口视图

三层聚合接口视图/三层聚合子接口视图

VSI虚接口视图

VLAN接口视图

【缺省用户角色】

network-admin

【举例】

# 开启GigabitEthernet3/1/1接口下授权ARP功能。

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] arp authorized enable

1.7  ARP自动扫描、固化配置命令

1.7.1  arp fixup

arp fixup命令用来将设备上的动态ARP表项转化成静态ARP表项。

undo arp fixup命令用来将设备上有效静态ARP表项转化为动态ARP表项,将无效静态ARP表项删除。

【命令】

arp fixup

undo arp fixup

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

本命令将当前的动态ARP表项转换为静态ARP表项,后续学习到的动态ARP表项可以通过再次执行arp fixup命令进行固化。

固化后的静态ARP表项与配置产生的静态ARP表项相同。

固化生成的静态ARP表项数量同样受到设备可以支持的静态ARP表项数目的限制,由于静态ARP表项数量的限制可能导致只有部分动态ARP表项被固化。

如果用户执行固化前有D个动态ARP表项,S个静态ARP表项,由于固化过程中存在动态ARP表项的老化或者新建动态ARP表项的情况,所以固化后的静态ARP表项可能为(D+S+M-N)个。其中,M为固化过程中新建的动态ARP表项个数,N为固化过程中老化的动态ARP表项个数。

通过固化生成的静态ARP表项,可以通过命令行undo arp ip-address [ vpn-instance-name ]逐条删除,也可以通过命令行reset arp allreset arp static全部删除。

【举例】

# 将设备上的动态ARP表项转化成静态ARP表项。

<Sysname> system-view

[Sysname] arp fixup

1.7.2  arp scan

arp scan命令用来开启ARP自动扫描功能。

【命令】

arp scan [ start-ip-address to end-ip-address ]

【视图】

三层以太网接口视图/三层以太网子接口视图

三层聚合接口视图/三层聚合子接口视图

VSI虚接口视图

VLAN接口视图

【缺省用户角色】

network-admin

【参数】

start-ip-address:ARP扫描区间的起始IP地址。起始IP地址必须小于等于终止IP地址。

end-ip-address:ARP扫描区间的终止IP地址。

【使用指导】

ARP自动扫描功能可以对接口下指定地址范围内的邻居进行扫描,对于已存在ARP表项的IP地址不进行扫描。

如果用户知道局域网内邻居分配的IP地址范围,指定了ARP扫描区间,则对该范围内的邻居进行扫描,减少扫描等待的时间。如果指定的扫描区间同时在接口下多个IP地址的网段内,则发送的ARP请求报文的源IP地址选择网段范围较小的接口IP地址。

如果用户不指定ARP扫描区间的起始IP地址和终止IP地址,则仅对接口下的主IP地址网段内的邻居进行扫描。其中,发送的ARP请求报文的源IP地址就是接口的主IP地址。

ARP扫描区间的起始IP地址和终止IP地址必须与接口的IP地址(主IP地址或手工配置的从IP地址)在同一网段。

扫描操作可能比较耗时,用户可以通过<Ctrl_C>来终止扫描(在终止扫描时,对于已经收到的邻居应答,会建立该邻居的动态ARP表项)。

【举例】

# 对接口GigabitEthernet3/1/1下的主IP地址网段内的邻居进行扫描。

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] arp scan

# 对接口GigabitEthernet3/1/1下指定地址范围内的邻居进行扫描。

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] arp scan 1.1.1.1 to 1.1.1.20

1.8  ARP网关保护配置命令

1.8.1  arp filter source

arp filter source命令用来开启ARP网关保护功能,配置受保护的网关IP地址。

undo arp filter source命令用来关闭ARP网关保护功能,并删除已配置的受保护网关IP地址。

【命令】

arp filter source ip-address

undo arp filter source ip-address

【缺省情况】

ARP网关保护功能处于关闭状态。

【视图】

二层以太网接口视图

二层聚合接口视图

【缺省用户角色】

network-admin

【参数】

ip-address:受保护的网关IP地址。

【使用指导】

每个接口最多支持配置8个受保护的网关IP地址。

不能在同一接口下同时配置命令arp filter sourcearp filter binding

【举例】

# 在GigabitEthernet3/1/1下开启ARP网关保护功能,受保护的网关IP地址为1.1.1.1。

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] arp filter source 1.1.1.1

1.9  ARP过滤保护配置命令

1.9.1  arp filter binding

arp filter binding命令用来开启ARP过滤保护功能并配置ARP过滤保护表项。

undo arp filter binding命令用来删除ARP过滤保护表项。

【命令】

arp filter binding ip-address mac-address

undo arp filter binding ip-address

【缺省情况】

ARP过滤保护功能处于关闭状态。

【视图】

二层以太网接口视图

二层聚合接口视图

【缺省用户角色】

network-admin

【参数】

ip-address:允许通过的ARP报文的源IP地址。

mac-address:允许通过的ARP报文的源MAC地址。

【使用指导】

ARP过滤保护表项可以限制只有特定源IP地址和源MAC地址的ARP报文才允许通过。

每个接口最多支持配置8组允许通过的ARP报文的源IP地址和源MAC地址。

不能在同一接口下同时配置命令arp filter sourcearp filter binding

【举例】

# 在GigabitEthernet3/1/1下开启ARP过滤保护功能,允许源IP地址为1.1.1.1、源MAC地址为0e10-0213-1023的ARP报文通过。

<Sysname> system-view

[Sysname] interface gigabitethernet 3/1/1

[Sysname-GigabitEthernet3/1/1] arp filter binding 1.1.1.1 0e10-0213-1023

1.10  ARP报文发送端IP地址检查功能

1.10.1  arp sender-ip-range

arp sender-ip-range命令用来开启ARP报文发送端IP地址检查功能,并配置允许学习的ARP报文的发送端IP地址范围。

undo arp sender-ip-range命令用来关闭ARP报文发送端IP地址检查功能。

【命令】

arp sender-ip-range start-ip-address end-ip-address

undo arp sender-ip-range

【缺省情况】

ARP报文发送端IP地址检查功能处于关闭状态。

【视图】

VLAN视图

【缺省用户角色】

network-admin

【参数】

start-ip-address:起始IP地址。

end-ip-address:终止IP地址,必须大于等于起始IP地址。

【使用指导】

如果设备收到的VLAN内ARP报文的发送端IP地址不在指定地址范围内,则将该ARP报文丢弃。

多次执行本命令后,最后一次执行的命令生效。

【举例】

# 在VLAN 2中配置ARP报文发送端IP地址检查功能,并配置允许学习的ARP报文的发送端IP地址范围为1.1.1.1到1.1.1.20。

<Sysname> system-view

[Sysname] vlan 2

[Sysname–vlan2] arp sender-ip-range 1.1.1.1 1.1.1.20

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们