Configuring Defense Against DHCP Server DoS Attacks
Context
Malicious use of IP addresses exhausts IP addresses in the IP address pool, so authorized users cannot obtain IP addresses. The DHCP server generally identifies the MAC address of a DHCP client based on the CHADDR (client hardware address) field in the DHCP Request message. If attackers continuously apply for IP addresses by changing the CHADDR field, IP addresses in the address pool on the DHCP server may be exhausted. As a result, authorized users cannot obtain IP addresses.
To prevent DHCP users on some interfaces from applying IP addresses maliciously, you can limit the number of DHCP snooping binding entries that can be learned by an interface. When the number of DHCP snooping binding entries reaches the maximum value, no DHCP client can obtain an IP address through the interface. To prevent attackers from continuously changing the CHADDR field in the DHCP Request message, enable the device to check whether the MAC address in the Ethernet frame header matches the CHADDR field in the DHCP message. If the two values match, the message is forwarded; if the two values do not match, the message is discarded.
On a CE12800E, this function cannot be configured in the BD view.
Procedure
- Run system-view
The system view is displayed.
- Set the maximum number of DHCP snooping binding entries to be learned by an interface in the system, VLAN, BD view or interface view.
- In the system view:
- In the VLAN view, BD view, or interface view:
- Enable the device to check the CHADDR field in the message in the system view, VLAN view, BD view or interface view.
- In the system view:
- In the VLAN view, BD view, or interface view:
- (Optional) Set the alarm threshold for the number of messages discarded by DHCP snooping in the system view or interface view.
- In the system view:
- In the interface view:
- Run commit
The configuration is committed.