- Table of Contents
-
- 13-Security Configuration Guide
- 00-Preface
- 01-ACL configuration
- 02-Time range configuration
- 03-User profile configuration
- 04-Public key management
- 05-PKI configuration
- 06-IPsec configuration
- 07-SSH configuration
- 08-Attack detection and prevention configuration
- 09-ARP attack protection configuration
- 10-ND attack defense configuration
- 11-Crypto engine configuration
- 12-Password control configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
09-ARP attack protection configuration | 117.14 KB |
Contents
1 Configuring ARP attack protection
ARP attack protection tasks at a glance
Configuring unresolvable IP attack protection
About unresolvable IP attack protection
Configuring ARP source suppression
Configuring ARP blackhole routing
Display and maintenance commands for unresolvable IP attack protection
Configuring ARP packet rate limit
Configuring source MAC-based ARP attack detection
About source MAC-based ARP attack detection
Display and maintenance commands for source MAC-based ARP attack detection
Configuring ARP packet source MAC consistency check
Configuring ARP active acknowledgement
Configuring ARP attack detection
Configuring user validity check
Configuring ARP packet validity check
Configuring ARP restricted forwarding
Display and maintenance commands for ARP attack detection
Configuring ARP scanning and fixed ARP
1 Configuring ARP attack protection
About ARP attack protection
The device can provide multiple features to detect and prevent ARP attacks and viruses in the LAN. An attacker can exploit ARP vulnerabilities to attack network devices in the following ways:
· Sends a large number of unresolvable IP packets to have the receiving device busy with resolving IP addresses until its CPU is overloaded. Unresolvable IP packets refer to IP packets for which ARP cannot find corresponding MAC addresses.
· Sends a large number of ARP packets to overload the CPU of the receiving device.
· Acts as a trusted user or gateway to send ARP packets so the receiving devices obtain incorrect ARP entries.
ARP attack protection tasks at a glance
All ARP attack protection tasks are optional.
· Preventing flood attacks
¡ Configuring unresolvable IP attack protection
¡ Configuring ARP packet rate limit
¡ Configuring source MAC-based ARP attack detection
· Preventing user and gateway spoofing attacks
¡ Configuring ARP packet source MAC consistency check
¡ Configuring ARP active acknowledgement
¡ Configuring ARP attack detection
¡ Configuring ARP scanning and fixed ARP
Configuring unresolvable IP attack protection
About unresolvable IP attack protection
If a device receives a large number of unresolvable IP packets from a host, the following situations can occur:
· The device sends a large number of ARP requests, overloading the target subnets.
· The device keeps trying to resolve the destination IP addresses, overloading its CPU.
To protect the device from such IP attacks, you can configure the following features:
· ARP source suppression—Stops resolving packets from an IP address if the number of unresolvable IP packets from the IP address exceeds the upper limit within 5 seconds. The device continues ARP resolution when the interval elapses. This feature is applicable if the attack packets have the same source addresses.
· ARP blackhole routing—Creates a blackhole route destined for an unresolved IP address. The device drops all matching packets until the blackhole route is deleted. A blackhole route is deleted when its aging timer is reached or the route becomes reachable.
After a blackhole route is created for an unresolved IP address, the device immediately starts the first ARP blackhole route probe by sending an ARP request. If the resolution fails, the device continues probing according to the probe settings. If the IP address resolution succeeds in a probe, the device converts the blackhole route to a normal route. If an ARP blackhole route ages out before the device finishes all probes, the device deletes the blackhole route and does not perform the remaining probes.
This feature is applicable regardless of whether the attack packets have the same source addresses.
Configuring ARP source suppression
1. Enter system view.
system-view
2. Enable ARP source suppression.
arp source-suppression enable
By default, ARP source suppression is disabled.
3. Set the maximum number of unresolvable packets that the device can process per source IP address within 5 seconds.
arp source-suppression limit limit-value
By default, the maximum number is 10.
Configuring ARP blackhole routing
Restrictions and guidelines
Set the ARP blackhole route probe count to a big value, for example, 25. If the device fails to reach the destination IP address temporarily and the probe count is too small, all probes might finish before the problem is resolved. As a result, non-attack packets will be dropped. This setting can avoid such situation.
Procedure
1. Enter system view.
system-view
2. Enable ARP blackhole routing.
arp resolving-route enable
By default, ARP blackhole routing is enabled.
3. (Optional.) Set the number of ARP blackhole route probes for each unresolved IP address.
arp resolving-route probe-count count
The default setting is three probes.
4. (Optional.) Set the interval at which the device probes ARP blackhole routes.
arp resolving-route probe-interval interval
The default setting is 1 second.
Display and maintenance commands for unresolvable IP attack protection
Execute display commands in any view.
Task |
Command |
Display ARP source suppression configuration information. |
display arp source-suppression |
Configuring ARP packet rate limit
About this task
The ARP packet rate limit feature allows you to limit the rate of ARP packets delivered to the CPU. An ARP attack detection-enabled device will send all received ARP packets to the CPU for inspection. Processing excessive ARP packets will make the device malfunction or even crash. To solve this problem, configure ARP packet rate limit. When the receiving rate of ARP packets on the interface exceeds the rate limit, those packets are discarded.
You can enable sending notifications to the SNMP module or enable logging for ARP packet rate limit.
· If notification sending is enabled, the device sends the highest threshold-crossed ARP packet rate within the sending interval in a notification to the SNMP module. You must use the snmp-agent target-host command to set the notification type and target host. For more information about notifications, see Network Management and Monitoring Command Reference.
· If logging for ARP packet rate limit is enabled, the device sends the highest threshold-crossed ARP packet rate within the sending interval in a log message to the information center. You can configure the information center module to set the log output rules. For more information about information center, see System Management Configuration Guide.
Restrictions and guidelines
As a best practice, configure this feature when ARP attack detection is enabled, or when ARP flood attacks are detected.
If excessive notifications and log messages are sent for ARP packet rate limit, you can increase notification and log message sending interval.
If you enable notification sending and logging for ARP packet rate limit on a Layer 2 aggregate interface, the features apply to all aggregation member ports.
Procedure
1. Enter system view.
system-view
2. (Optional.) Enable SNMP notifications for ARP packet rate limit.
snmp-agent trap enable arp [ rate-limit ]
By default, SNMP notifications for ARP packet rate limit are disabled.
3. (Optional.) Enable logging for ARP packet rate limit.
arp rate-limit log enable
By default, logging for ARP packet rate limit is disabled.
4. (Optional.) Set the notification and log message sending interval.
arp rate-limit log interval interval
By default, the device sends notifications and log messages every 60 seconds.
5. Enter interface view.
interface interface-type interface-number
Supported interface types include Layer 2 Ethernet interface and Layer 2 aggregate interface.
6. Enable ARP packet rate limit.
arp rate-limit [ pps ]
By default, ARP packet rate limit is enabled.
Configuring source MAC-based ARP attack detection
About source MAC-based ARP attack detection
This feature checks the number of ARP packets delivered to the CPU. If the number of packets from the same MAC address within 5 seconds exceeds a threshold, the device generates an ARP attack entry for the MAC address. If the ARP logging feature is enabled, the device handles the attack by using either of the following methods before the ARP attack entry ages out:
· Monitor—Only generates log messages.
· Filter—Generates log messages and filters out subsequent ARP packets from the MAC address.
To enable the ARP logging feature, use the arp check log enable command. For information about the ARP logging feature, see ARP configuration in Network Connectivity Configuration Guide.
When an ARP attack entry ages out, ARP packets sourced from the MAC address in the entry can be processed correctly.
Restrictions and guidelines
When you change the handling method from monitor to filter, the configuration takes effect immediately. When you change the handling method from filter to monitor, the device continues filtering packets that match existing attack entries.
You can exclude the MAC addresses of some gateways and servers from this detection. This feature does not inspect ARP packets from those devices even if they are attackers.
Procedure
1. Enter system view.
system-view
2. Enable source MAC-based ARP attack detection and specify the handling method.
arp source-mac { filter | monitor }
By default, this feature is disabled.
3. Set the threshold.
arp source-mac threshold threshold-value
By default, the threshold for source MAC-based ARP attack detection is 30.
4. Set the aging timer for ARP attack entries.
arp source-mac aging-time time
By default, the lifetime is 300 seconds.
5. (Optional.) Exclude specific MAC addresses from this detection.
arp source-mac exclude-mac mac-address&<1-n>
By default, no MAC address is excluded.
Display and maintenance commands for source MAC-based ARP attack detection
Execute display commands in any view.
Task |
Command |
Display ARP attack entries detected by source MAC-based ARP attack detection. |
display arp source-mac [ interface interface-type interface-number ] |
Configuring ARP packet source MAC consistency check
About this task
This feature enables a gateway to filter out ARP packets whose source MAC address in the Ethernet header is different from the sender MAC address in the message body. This feature allows the gateway to learn correct ARP entries.
Procedure
1. Enter system view.
system-view
2. Enable ARP packet source MAC address consistency check.
arp valid-check enable
By default, ARP packet source MAC address consistency check is disabled.
Configuring ARP active acknowledgement
About this task
Use the ARP active acknowledgement feature on gateways to prevent user spoofing.
This feature enables the device to perform active acknowledgement before creating an ARP entry.
· Upon receiving an ARP request that requests the MAC address of the device, the device sends an ARP reply. Then, it sends an ARP request for the sender IP address in the received ARP request to determine whether to create an ARP entry for the sender IP address.
¡ If the device receives an ARP reply within the probe interval, it creates the ARP entry.
¡ If the device does not receive an ARP reply within the probe interval, it does not create the ARP entry.
· Upon receiving an ARP reply, the device examines whether it was the reply to the request that the device has sent.
¡ If it was, the device creates an ARP entry for the sender IP address in the ARP reply.
¡ If it was not, the device sends an ARP request for the sender IP address to determine whether to create an ARP entry for the sender IP address.
- If the device receives an ARP reply within the probe interval, it creates the ARP entry.
- If the device does not receive an ARP reply within the probe interval, it does not create the ARP entry.
To improve validity and reliability of ARP entries, you can enable ARP active acknowledgement in strict mode. In this mode, the device creates ARP entries only for the IP addresses that the device actively initiates the ARP resolution.
Procedure
1. Enter system view.
system-view
2. Enable ARP active acknowledgement.
arp active-ack [ strict ] enable
By default, ARP active acknowledgement is disabled.
For ARP active acknowledgement to take effect in strict mode, make sure ARP blackhole routing is enabled.
Configuring ARP attack detection
About ARP attack detection
ARP attack detection enables access devices to block ARP packets from unauthorized clients to prevent user spoofing and gateway spoofing attacks.
ARP attack detection provides the following features:
· User validity check.
· ARP packet validity check.
· ARP restricted forwarding.
· ARP attack detection logging.
If both ARP packet validity check and user validity check are enabled, the former one applies first, and then the latter applies.
Configuring user validity check
About this task
User validity check does not check ARP packets received on ARP trusted interfaces. This feature compares the sender IP and sender MAC in the ARP packet received on an ARP untrusted interface with the matching criteria in the following order:
1. User validity check rules.
¡ If a match is found, the device processes the ARP packet according to the rule.
¡ If no match is found or no user validity check rule is configured, proceeds to step 2.
2. 802.1X security entries.
¡ If a match is found, the device determines that the ARP packet is valid, and then forwards the ARP packet.
- If a match is found and the receiving interface is the same as the interface in the entry with a matching sender IP address, the device performs Layer 3 forwarding.
- If a match is found but the receiviwith a matching sender IP addressng interface is different from the interface in the entry , the device performs Layer 2 forwarding.
¡ If no match is found, the device discards the ARP packet.
802.1X security entries record the IP-to-MAC mappings for 802.1X clients. After a client passes 802.1X authentication and uploads its IP address to an ARP attack detection enabled device, the device automatically generates an 802.1X security entry. The 802.1X client must be enabled to upload its IP address to the device.
Restrictions and guidelines
When you configure user validity check, make sure one or more of the following items are configured:
· User validity check rules.
· 802.1X.
If none of the items is configured, all incoming ARP packets on ARP untrusted interfaces are forwarded.
Procedure
1. Enter system view.
system-view
2. (Optional.) Configure a user validity check rule.
arp detection rule rule-id { deny | permit } ip { ip-address [ mask ] | any } mac { mac-address [ mask ] | any } [ vlan vlan-id ]
By default, no user validity check rules are configured.
3. Enter VLAN view.
vlan vlan-id
4. Enable ARP attack detection.
arp detection enable
By default, ARP attack detection is disabled. The device does not perform user validity check.
5. (Optional.) Configure an interface that does not require ARP user validity check as a trusted interface.
a. Return to system view.
quit
b. Enter interface view.
interface interface-type interface-number
Supported interface types include Layer 2 Ethernet interface and Layer 2 aggregate interface.
c. Configure the interface as a trusted interface excluded from ARP attack detection.
By default, an interface is untrusted.
Configuring ARP packet validity check
About this task
ARP packet validity check does not check ARP packets received on ARP trusted interfaces. To check ARP packets received on untrusted interfaces, you can specify the following objects to be checked:
· src-mac—Checks whether the sender MAC address in the message body is identical to the source MAC address in the Ethernet header. If they are identical, the packet is forwarded. Otherwise, the packet is discarded.
· dst-mac—Checks the target MAC address of ARP replies. If the target MAC address is all-zero, all-one, or inconsistent with the destination MAC address in the Ethernet header, the packet is considered invalid and discarded.
· ip—Checks the sender and target IP addresses of ARP replies, and the sender IP address of ARP requests. All-one or multicast IP addresses are considered invalid and the corresponding packets are discarded.
Prerequisites
Before you configure ARP packet validity check, you must first configure user validity check. For more information about user validity check configuration, see "Configuring user validity check."
Procedure
1. Enter system view.
system-view
2. Enter VLAN view.
vlan vlan-id
3. Enable ARP attack detection.
arp detection enable
By default, ARP attack detection is disabled.
4. Enable ARP packet validity check.
a. Return to system view.
quit
b. Enable ARP packet validity check and specify the objects to be checked.
arp detection validate { dst-mac | ip | src-mac } *
By default, ARP packet validity check is disabled.
5. (Optional.) Configure the interface that does not require ARP packet validity check as a trusted interface.
a. Enter interface view.
interface interface-type interface-number
Supported interface types include Layer 2 Ethernet interface and Layer 2 aggregate interface.
b. Configure the interface as a trusted interface excluded from ARP attack detection.
arp detection trust
By default, an interface is untrusted.
Configuring ARP restricted forwarding
About this task
ARP restricted forwarding does not take effect on ARP packets received on ARP trusted interfaces and forwards the ARP packets correctly. This feature controls the forwarding of ARP packets that are received on untrusted interfaces and have passed user validity check as follows:
· If the packets are ARP requests, they are forwarded through the trusted interface.
· If the packets are ARP replies, they are forwarded according to their destination MAC address. If no match is found in the MAC address table, they are forwarded through the trusted interface.
Restrictions and guidelines
ARP restricted forwarding does not apply to ARP packets that use multiport destination MAC addresses.
Prerequisites
Configure user validity check before you configure ARP restricted forwarding. For information about user validity check configuration, see "Configuring user validity check."
Procedure
1. Enter system view.
system-view
2. Enter VLAN view.
vlan vlan-id
3. Enable ARP restricted forwarding.
arp restricted-forwarding enable
By default, ARP restricted forwarding is disabled.
Display and maintenance commands for ARP attack detection
Execute display commands in any view and reset commands in user view.
Task |
Command |
Display the VLANs enabled with ARP attack detection. |
display arp detection |
Display statistics for packets dropped by ARP attack detection. |
display arp detection statistics [ interface interface-type interface-number ] |
Clear statistics for packets dropped by ARP attack detection. |
reset arp detection statistics [ interface interface-type interface-number ] |
Configuring ARP scanning and fixed ARP
About this task
ARP scanning is typically used together with the fixed ARP feature in small-scale and stable networks.
ARP scanning automatically creates ARP entries for devices in an address range. The device performs ARP scanning in the following steps:
1. Sends ARP requests for each IP address in the address range.
2. Obtains their MAC addresses through received ARP replies.
3. Creates dynamic ARP entries.
Fixed ARP converts existing dynamic ARP entries (including those generated through ARP scanning) to static ARP entries. These static ARP entries are of the same attributes as the ARP entries that are manually configured. This feature prevents ARP entries from being modified by attackers.
Restrictions and guidelines
IP addresses in existing ARP entries are not scanned.
Due to the limit on the total number of static ARP entries, some dynamic ARP entries might fail the conversion.
The arp fixup command is a one-time operation. You can use this command again to convert the dynamic ARP entries learned later to static.
To delete a static ARP entry converted from a dynamic one, use the undo arp ip-address command. You can also use the reset arp all command to delete all ARP entries or the reset arp static command to delete all static ARP entries.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Trigger an ARP scanning.
arp scan [ start-ip-address to end-ip-address ]
CAUTION: ARP scanning will take some time and occupy a lot of device and network resources. To stop an ongoing scan, press Ctrl + C. Dynamic ARP entries are created based on ARP replies received before the scan is terminated. |
4. Return to system view.
quit
5. Convert existing dynamic ARP entries to static ARP entries.
arp fixup