dhcp relay detect enable
Function
The dhcp relay detect enable command enables user entry detection on a DHCP relay agent.
The undo dhcp relay detect enable command disables user entry detection on the DHCP relay agent.
By default, user entry detection is disabled on a DHCP relay agent.
Usage Guidelines
This command applies to the device that functions as a DHCP relay agent. After receiving Ack messages from a DHCP server, the DHCP relay agent sends all Ack messages in which the giaddr field value is the same as DHCP clients' network segment to DHCP clients. After DHCP clients successfully obtain IP addresses through the DHCP relay agent, the DHCP relay agent adds corresponding user entries. In some cases, for example, multiple DHCP servers exist on the network or the address pool on the DHCP server is reset, DHCP clients may obtain the same IP address, resulting in an address conflict.
- If the addresses are consistent with the user entry, the DHCP relay agent forwards the Ack message to the DHCP client, and the DHCP client successfully obtains the IP address.
- If the addresses are inconsistent with the user entry, the DHCP relay agent sends a Decline message indicating that the IP address has been used by another client to the DHCP server, and sends a Nak message to the DHCP client to instruct the DHCP client to request an IP address again.
If the DHCP relay agent receives a Release or Decline message from a DHCP client, the DHCP relay agent deletes the corresponding user entry.
When the number of user entries reaches the maximum value, the device does not record user entries for new online users, and does not perform address conflict detection for these users. Therefore, it is recommended that you reduce the lease time appropriately based on the actual usage scenario after configuring user entry detection on the DHCP relay agent. This configuration ensures that user entries of offline users can be cleared promptly and the device can perform address conflict detection for online users.
If the device is configured as a DHCP relay agent in proxy mode, new users cannot obtain IP addresses when the number of user entries reaches the maximum value. It is recommended that you reduce the lease time appropriately based on the actual usage scenario so that user entries of offline users can be cleared promptly and new users can go online properly.