Configuring Rate Limiting on ARP Packets based on Source MAC Addresses
Context
A large number of ARP packets with a fixed source MAC address and variable IP addresses will cause the CPU of a device to be overloaded and exhaust ARP entries.
To prevent this problem, configure the gateway to limit the rate of ARP packets based on MAC addresses. The gateway then collects statistics on ARP packets sent from certain MAC addresses to the CPU. If the number of ARP packets received in one second from the specified MAC address exceeds the threshold, the device discards the excess ARP packets.
Procedure
- Run system-view
The system view is displayed.
- Configure rate limit on ARP packets based on source MAC addresses.
Run arp anti-attack rate-limit source-mac maximum maximum
The maximum rate of ARP packets from any source MAC address is set
Run arp anti-attack rate-limit source-mac mac-address maximum maximum
The maximum rate of ARP packets from the specified source MAC address is set.
When both the preceding commands are executed, the maximum rate set using the arp anti-attack rate-limit source-mac mac-address maximum maximum command takes effect on ARP packets from the specified source MAC address, and the maximum rate set using the arp anti-attack rate-limit source-mac maximum maximum command takes effect on ARP packets from other source MAC addresses.
By default, the maximum rate of ARP packets from each source MAC address is set to 0, that is, the rate of ARP packets is not limited based on source MAC addresses.
- Run commit
The configuration is committed.