其他分享
首页 > 其他分享> > 详述网络中ARP安全的综合功能

详述网络中ARP安全的综合功能

作者:互联网

组网图形

    

ARP安全简介

  常见的ARP攻击如下:
  1. 用户主机直接接入网关,攻击者将伪造网关的ARP报文发送给用户主机,使用户主机误以为攻击者即为网关。用户主机的ARP表中会记录错误的网关地址映射关系,这样就会把发往网关的流量均发送给了攻击者,攻击者可轻易窃听到用户主机发送的数据内容。

  2. 网络中有用户向设备发送大量目的IP地址不能解析的IP报文(即路由表中存在该IP报文的目的IP对应的路由表项,但设备上没有该路由表项中下一跳对应的ARP表项),将导致设备触发大量的ARP Miss消息。这种触发ARP Miss消息的IP报文(即ARP Miss报文)会被上送到CPU进行处理,设备会根据ARP Miss消息生成和下发大量临时ARP表项并向目的网络发送大量ARP请求报文,这样就增加了设备CPU的负担,同时严重消耗目的网络的带宽资源。

  3. 设备收到大量ARP攻击报文,并需要对所有ARP攻击报文全部进行处理,可能导致CPU负荷过重而无法处理其他业务。

   针对以上攻击,ARP安全提供如下措施保证网络设备的安全性:

组网需求

  如图1所示,Switch作为网关通过接口GE1/0/3连接一台服务器,通过接口GE1/0/1、GE1/0/2连接VLAN10和VLAN20下的四个用户。网络中可能存在以下ARP威胁:

  管理员希望能够防止上述ARP攻击行为,为用户提供更安全的网络环境和更稳定的网络服务。

配置思路

操作步骤

  # 创建VLAN10、VLAN20和VLAN30,并将接口GE1/0/1加入VLAN10中,接口GE1/0/2加入VLAN20中,接口GE1/0/3加入VLAN30中。

<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] vlan batch 10 20 30
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] port link-type trunk
[Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
[Switch-GigabitEthernet1/0/1] quit
[Switch] interface gigabitethernet 1/0/2
[Switch-GigabitEthernet1/0/2] port link-type trunk
[Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 20
[Switch-GigabitEthernet1/0/2] quit
[Switch] interface gigabitethernet 1/0/3
[Switch-GigabitEthernet1/0/3] port link-type trunk
[Switch-GigabitEthernet1/0/3] port trunk allow-pass vlan 30
[Switch-GigabitEthernet1/0/3] quit

   # 创建接口VLANIF10、VLANIF20、VLANIF30,配置各VLANIF接口的IP地址。

[Switch] interface vlanif 10
[Switch-Vlanif10] ip address 10.8.8.4 24
[Switch-Vlanif10] quit
[Switch] interface vlanif 20
[Switch-Vlanif20] ip address 10.9.9.4 24
[Switch-Vlanif20] quit
[Switch] interface vlanif 30
[Switch-Vlanif30] ip address 10.10.10.3 24
[Switch-Vlanif30] quit
[Switch] arp anti-attack gateway-duplicate enable  //配置ARP防网关冲突

  # 配置对Server(IP地址为10.10.10.2)的ARP Miss消息进行限速,允许Switch每秒最多处理该IP地址触发的40个ARP Miss消息;对于其他用户,允许Switch每秒最多处理同一个源IP地址触发的20个ARP Miss消息。

[Switch] arp-miss speed-limit source-ip maximum 20  //配置根据源IP地址进行ARP Miss消息限速
[Switch] arp-miss speed-limit source-ip 10.10.10.2 maximum 40  //配置根据源IP地址进行ARP Miss消息限速

  # 配置对用户User1(MAC地址为0001-0001-0001)进行ARP报文限速,每秒最多只允许10个该MAC地址的ARP报文通过。

[Switch] arp speed-limit source-mac 0001-0001-0001 maximum 10  //配置根据源MAC地址进行ARP限速

  # 配置对用户User3(IP地址为10.9.9.2)进行ARP报文限速,每秒最多只允许10个该IP地址的ARP报文通过。

[Switch] arp speed-limit source-ip 10.9.9.2 maximum 10  //配置根据源IP地址进行ARP限速

  # 执行命令display arp anti-attack configuration all,查看当前ARP防攻击配置情况。

[Switch] display arp anti-attack configuration all
......
ARP anti-attack entry-check mode:
Vlanif      Mode
-------------------------------------------------------------------------------
All         disabled
-------------------------------------------------------------------------------

ARP rate-limit configuration:
-------------------------------------------------------------------------------
Global configuration:
Interface configuration:
Vlan configuration:
-------------------------------------------------------------------------------

ARP miss rate-limit configuration:
-------------------------------------------------------------------------------
Global configuration:
Interface configuration:
Vlan configuration:
-------------------------------------------------------------------------------

ARP speed-limit for source-MAC configuration:
MAC-address         suppress-rate(pps)(rate=0 means function disabled)
-------------------------------------------------------------------------------
0001-0001-0001      10
Others              0
-------------------------------------------------------------------------------
The number of configured specified MAC address(es) is 1, spec is 1024.

ARP speed-limit for source-IP configuration:
IP-address          suppress-rate(pps)(rate=0 means function disabled)
-------------------------------------------------------------------------------
10.9.9.2            10
Others              30
-------------------------------------------------------------------------------
The number of configured specified IP address(es) is 1, spec is 1024.

ARP miss speed-limit for source-IP configuration:
IP-address          suppress-rate(pps)(rate=0 means function disabled)
-------------------------------------------------------------------------------
10.10.10.2/32       40
Others              20
-------------------------------------------------------------------------------
The number of configured specified IP address(es) is 1, spec is 1024. 

   # 执行命令display arp packet statistics,查看ARP处理的报文统计数据。

[Switch] display arp packet statistics
ARP Pkt Received:   sum  8678904
ARP-Miss Msg Received:   sum      183
ARP Learnt Count:   sum     37
ARP Pkt Discard For Limit:   sum      146
ARP Pkt Discard For SpeedLimit:   sum      40529
ARP Pkt Discard For Proxy Suppress:   sum      0
ARP Pkt Discard For Other:   sum  8367601
ARP-Miss Msg Discard For SpeedLimit:   sum      20
ARP-Miss Msg Discard For Other:   sum      104  

   由显示信息可知,Switch上产生了ARP报文和ARP Miss消息丢弃计数,表明ARP安全功能已经生效。

 

标签:ARP,详述,报文,网络,Switch,IP地址,configuration,Miss
来源: https://www.cnblogs.com/zhangwencheng/p/14176876.html