• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

07-安全分冊

目錄

10-ARP攻擊防禦命令

本章節下載 10-ARP攻擊防禦命令  (132.68 KB)

10-ARP攻擊防禦命令


1 ARP攻擊防禦配置

1.1  ARP防止IP報文攻擊配置命令

1.1.1  arp resolving-route enable

【命令】

arp resolving-route enable

undo arp resolving-route enable

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

【描述】

arp resolving-route enable命令用來使能ARP黑洞路由功能。undo arp resolving-route enable命令用來關閉ARP黑洞路由功能。

缺省情況下,使能ARP黑洞路由功能。

【舉例】

# 使能ARP黑洞路由功能。

<Sysname> system-view

[Sysname] arp resolving-route enable

1.1.2  arp source-suppression enable

【命令】

arp source-suppression enable

undo arp source-suppression enable

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

【描述】

arp source-suppression enable命令用來使能ARP源地址抑製功能。undo arp source-suppression enable命令用來恢複缺省情況。

缺省情況下,關閉ARP源地址抑製功能。

相關配置可參考命令display arp source-suppression

【舉例】

# 使能ARP源抑製功能。

<Sysname> system-view

[Sysname] arp source-suppression enable

1.1.3  arp source-suppression limit

【命令】

arp source-suppression limit limit-value

undo arp source-suppression limit

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

limit-value:ARP源抑製的閾值,取值範圍為2~1024。

【描述】

arp source-suppression limit命令用來配置ARP源抑製的閾值。undo arp source-suppression limit命令用來恢複缺省情況

缺省情況下,ARP源抑製的閾值10

如果網絡中某主機向設備某端口連續發送目標IP地址不能解析的IP報文(當每5秒內的ARP請求報文的流量超過設置的閾值),對於由此IP地址發出的IP報文,設備不允許其觸發ARP請求,直至5秒後再處理,從而避免了惡意攻擊所造成的危害。

相關配置可參考命令display arp source-suppression

【舉例】

# 配置ARP源抑製的閾值為100。

<Sysname> system-view

[Sysname] arp source-suppression limit 100

1.1.4  display arp source-suppression

【命令】

display arp source-suppression

【視圖】

任意視圖

【缺省級別】

2:係統級

【參數】

【描述】

display arp source-suppression命令用來顯示當前ARP源抑製的配置信息。

【舉例】

# 顯示當前ARP源抑製的配置信息。

<Sysname> display arp source-suppression

 ARP source suppression is enabled

 Current suppression limit: 100

 Current cache length: 16

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

字段

描述

ARP source suppression is enabled

ARP源地址抑製功能處於使能狀態

Current suppression limit

設備在5秒時間間隔內可以接收到的同源IP,且目的IP地址不能解析的IP報文的最大數目

Current cache length

目前記錄源抑製信息的緩存的長度

 

1.2  ARP主動確認配置命令

1.2.1  arp anti-attack active-ack enable

【命令】

arp anti-attack active-ack enable

undo arp anti-attack active-ack enable

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

【描述】

arp anti-attack active-ack enable命令用來使能ARP主動確認功能。undo arp anti-attack active-ack enable命令用來恢複缺省情況。

缺省情況下,關閉ARP主動確認功能。

ARP的主動確認功能主要應用於網關設備上,防止攻擊者仿冒用戶欺騙網關設備。

【舉例】

# 使能ARP主動確認功能。

<Sysname> system-view

[Sysname] arp anti-attack active-ack enable

1.3  源MAC地址固定的ARP攻擊檢測配置命令

1.3.1  arp anti-attack source-mac

【命令】

arp anti-attack source-mac { filter | monitor }

undo arp anti-attack source-mac [ filter | monitor ]

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

filter:檢測到攻擊後,打印告警信息,同時對該源MAC地址對應的ARP報文進行過濾。

monitor:檢測到攻擊後,隻打印告警信息,不對該源MAC地址對應的ARP報文進行過濾。

【描述】

arp anti-attack source-mac命令用來使能源MAC地址固定ARP攻擊檢測功能,並選擇檢查模式。undo arp anti-attack source-mac命令用來恢複缺省情況。

缺省情況下,源MAC地址固定ARP攻擊檢測功能處於關閉狀態。

使能源MAC固定ARP攻擊檢測之後,該特性會對上送CPU的ARP報文按照源MAC和VLAN進行統計。當在一定時間(5秒)內收到某固定源MAC地址的ARP報文超過設定的閾值,不同模式的處理方式存在差異:在filter模式下會打印告警信息並對該源MAC地址對應的ARP報文進行過濾;在monitor模式下隻進行告警,不過濾ARP報文。

需要注意的是,如果undo命令中沒有指定檢查模式,則關閉任意檢查模式的源MAC固定ARP攻擊檢測功能。

【舉例】

# 使能源MAC固定ARP攻擊檢測功能,並選擇filter檢查模式。

<Sysname> system-view

[Sysname] arp anti-attack source-mac filter

1.3.2  arp anti-attack source-mac aging-time

【命令】

arp anti-attack source-mac aging-time time

undo arp anti-attack source-mac aging-time

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

time:源MAC地址固定的ARP攻擊檢測表項的老化時間,取值範圍為60~6000,單位為秒。

【描述】

arp anti-attack source-mac aging-time命令用來配置源MAC地址固定的ARP攻擊檢測表項的老化時間。undo arp anti-attack source-mac aging-time命令用來恢複缺省情況。

缺省情況下,源MAC地址固定的ARP攻擊檢測表項的老化時間為300秒,即5分鍾。

【舉例】

# 配置源MAC地址固定的ARP攻擊檢測表項的老化時間為60秒。

<Sysname> system-view

[Sysname] arp anti-attack source-mac aging-time 60

1.3.3  arp anti-attack source-mac exclude-mac

【命令】

arp anti-attack source-mac exclude-mac mac-address&<1-10>

undo arp anti-attack source-mac exclude-mac [ mac-address&<1-10> ]

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

mac-address&<1-10>:MAC地址列表。其中,mac-address表示配置的保護MAC地址,格式為H-H-H。&<1-10>表示前麵的參數最多可以重複輸10次。

【描述】

arp anti-attack source-mac exclude-mac命令用來配置保護MAC。當配置了保護MAC之後,即使該ARP報文中的MAC地址存在攻擊也不會被檢測過濾。undo arp anti-attack source-mac exclude-mac命令用來取消配置的保護MAC。

缺省情況下,沒有配置任何保護MAC。

需要注意的是,如果undo命令中沒有指定MAC地址,則取消所有配置的保護MAC。

【舉例】

# 配置源MAC固定攻擊檢查的保護MAC地址為2-2-2。

<Sysname> system-view

[Sysname] arp anti-attack source-mac exclude-mac 2-2-2

1.3.4  arp anti-attack source-mac threshold

【命令】

arp anti-attack source-mac threshold threshold-value

undo arp anti-attack source-mac threshold

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

threshold-value:固定時間內源MAC固定ARP報文攻擊檢測的閾值,取值範圍為10~100。

【描述】

arp anti-attack source-mac threshold命令用來配置源MAC固定ARP報文攻擊檢測閾值,當在固定的時間(5秒)內收到源MAC固定的ARP報文超過該閾值則認為存在攻擊。undo arp anti-attack source-mac threshold命令用來恢複缺省閾值。

缺省情況下,源MAC固定ARP報文攻擊檢測閾值為50。

【舉例】

# 配置源MAC固定ARP報文攻擊檢測閾值為30。

<Sysname> system-view

[Sysname] arp anti-attack source-mac threshold 30

1.3.5  display arp anti-attack source-mac

【命令】

display arp anti-attack source-mac { slot slot-number | interface interface-type interface-number }

【視圖】

任意視圖

【缺省級別】

1:監控級

【參數】

interface interface-type interface-number:顯示指定接口檢測到的源MAC地址固定的ARP攻擊檢測表項。

slot slot-number:顯示指定單板檢測到的源MAC地址固定的ARP攻擊檢測表項。slot-number表示單板的槽位號。

【描述】

display arp anti-attack source-mac命令用來顯示檢測到的源MAC地址固定的ARP攻擊檢測表項。

【舉例】

# 顯示檢測到的源MAC地址固定的ARP攻擊檢測表項。

<Sysname> display arp anti-attack source-mac slot 2

Source-MAC          VLAN ID           Interface             Aging-time

23f3-1122-3344      4094              GE2/0/1                 10

23f3-1122-3355      4094              GE2/0/2                 30

23f3-1122-33ff      4094              GE2/0/3                 25

23f3-1122-33ad      4094              GE2/0/4                 30

23f3-1122-33ce      4094              GE2/0/5                 2

表1-2 display arp anti-attack source-mac命令顯示信息描述表

字段

描述

Source-MAC

檢測到攻擊的源MAC地址

VLAN ID

檢測到攻擊的VLAN ID

Interface

攻擊來源的接口索引

Aging-time

ARP防攻擊策略表項老化剩餘時間

 

1.4  ARP報文限速配置命令

1.4.1  arp rate-limit

【命令】

arp rate-limit { disable | rate pps drop }

undo arp rate-limit

【視圖】

二層以太網接口視圖

【缺省級別】

2:係統級

【參數】

disable:不進行限速。

rate pps:ARP限速速率,單位為包每秒(pps),取值範圍為50~300。

drop:丟棄超出限速部分的報文。

【描述】

arp rate-limit命令用來開啟ARP報文上送限速功能,可以配置端口ARP報文限速速率,配置對超速ARP報文的處理,或者配置取消ARP報文限速。undo arp rate-limit命令用來恢複端口ARP報文限速的缺省值。

缺省情況下,開啟ARP報文上送限速功能,ARP限速速率為100。

【舉例】

# 配置二層以太網接口GigabitEthernet2/0/1端口ARP報文上送限速為50pps,超過限速部分的報文丟棄。

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/0/1

[Sysname-GigabitEthernet2/0/1] arp rate-limit rate 50 drop

1.5  ARP Detection配置命令

1.5.1  arp detection enable

【命令】

arp detection enable

undo arp detection enable

【視圖】

VLAN視圖

【缺省級別】

2:係統級

【參數】

【描述】

arp detection enable命令用來使能ARP Detection功能,即對ARP報文進行用戶合法性檢查。undo arp detection enable命令用來關閉ARP Detection功能。

缺省情況下,關閉ARP Detection功能。

【舉例】

# 使能ARP Detection功能。

<Sysname> system-view

[Sysname] vlan 1

[Sysname-Vlan1] arp detection enable

1.5.2  arp detection trust

【命令】

arp detection trust

undo arp detection trust

【視圖】

二層以太網接口視圖

【缺省級別】

2:係統級

【參數】

【描述】

arp detection trust命令用來配置端口為ARP信任端口。undo arp detection trust命令用來配置端口為ARP非信任端口。

缺省情況下,端口為ARP非信任端口。

【舉例】

# 配置二層以太網接口GigabitEthernet2/0/1為ARP信任端口。

<Sysname> system-view

[Sysname] interface GigabitEthernet 2/0/1

[Sysname-GigabitEthernet2/0/1] arp detection trust

1.5.3  arp detection validate

【命令】

arp detection validate { dst-mac | ip | src-mac } *

undo arp detection validate [ dst-mac | ip | src-mac ] *

【視圖】

係統視圖

【缺省級別】

2:係統級

【參數】

dst-mac:檢查ARP應答報文中的目的MAC地址,是否為全0或者全1,是否和以太網報文頭中的目的MAC地址一致。全0、全1、不一致的報文都是無效的,無效的報文需要被丟棄。

ip:檢查ARP報文源IP和目的IP地址,全0、全1、或者組播IP地址都是不合法的,需要丟棄。對於ARP應答報文,源IP和目的IP地址都進行檢查;對於ARP請求報文,隻檢查源IP地址。

src-mac:檢查ARP報文中的源MAC地址和以太網報文頭中的源MAC地址是否一致,一致認為有效,否則丟棄。

【描述】

arp detection validate命令用來使能對ARP報文的目的或源MAC地址、IP地址的有效性檢查。使能有效性檢查時可以指定某一種檢查方式也可以配置成多種檢查方式的組合。undo arp detection validate命令用來關閉對ARP報文的有效性檢查。關閉時可以指定關閉某一種或多種檢查,在不指定檢查方式時,表示關閉所有有效性檢查。

缺省情況下,關閉對ARP報文的目的或源MAC地址、IP地址的有效性檢查。

需要注意的是,如果undo命令中沒有指定檢查方式,則關閉已經配置的所有檢查方式。

【舉例】

# 使能對ARP報文的MAC地址和IP地址的有效性檢查。

<Sysname> system-view

[Sysname] arp detection validate dst-mac src-mac ip

1.5.4  display arp detection

【命令】

display arp detection

【視圖】

任意視圖

【缺省級別】

1:監控級

【參數】

【描述】

display arp detection命令用來顯示使能了ARP Detection功能的VLAN。

相關配置可參考arp detection enable

【舉例】

# 顯示所有使能了ARP Detection功能的VLAN。

<Sysname> display arp detection

ARP detection is enabled in the following VLANs:

1, 2, 4-5

表1-3 display arp detection命令顯示信息描述表

字段

描述

ARP detection is enabled in the following VLANs

使能了ARP Detection功能的VLAN

 

1.5.5  display arp detection statistics

【命令】

display arp detection statistics [ interface interface-type interface-number ]

【視圖】

任意視圖

【缺省級別】

1:監控級

【參數】

interface interface-type interface-number:顯示指定接口的統計信息。interface-type interface-number用來指定接口類型和編號。

【描述】

display arp detection statistics命令用來顯示ARP Detection功能報文檢查的丟棄計數的統計信息。按端口顯示用戶合法性檢查,報文有效性檢查和ARP報文上送限速的統計情況,隻顯示丟棄的情況。不指定端口時,顯示所有端口的統計信息。

【舉例】

# 顯示ARP Detection功能報文檢查的丟棄計數的統計信息。

<Sysname> display arp detection statistics

State: U-Untrusted  T-Trusted

ARP packets dropped by ARP inspect checking:

Interface(State)           IP            Src-MAC       Dst-MAC       Inspect

BAGG1(U)                   0             0             0             0

GE2/0/1(T)                 0             0             0             0

GE2/0/2(U)                 0             0             0             0

GE2/0/3(U)                 0             0             0             0

GE2/0/4(U)                 0             0             0             0

GE2/0/5(U)                 0             0             0             0

GE2/0/6(U)                 0             0             0             0

GE2/0/7(U)                 0             0             0             0

GE2/0/8(U)                 0             0             0             0

GE2/0/9(U)                 0             0             0             0

表1-4 display arp detection statistics命令顯示信息描述表

字段

描述

Interface(State)

ARP報文入接口,State表示該接口的信任狀態

IP

ARP報文源和目的IP地址檢查不通過丟棄的報文計數

Src-MAC

ARP報文源MAC地址檢查不通過丟棄的報文計數

Dst-MAC

ARP報文目的MAC地址檢查不通過丟棄的報文計數

Inspect

ARP報文結合用戶合法性檢查(DHCP Snooping、802.1X、靜態綁定)不通過丟棄的報文計數

 

1.5.6  reset arp detection statistics

【命令】

reset arp detection statistics [ interface interface-type interface-number ]

【視圖】

用戶視圖

【缺省級別】

2:係統級

【參數】

interface interface-type interface-number:表示清除指定接口下的統計信息。interface-type interface-number用來指定接口類型和編號。

【描述】

reset arp detection statistics命令用來清除ARP Detection的統計信息。不指定接口時,清除所有的ARP Detection統計信息。

【舉例】

# 清除所有的ARP Detection統計信息。

<Sysname> reset arp detection statistics

 

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們