Does DHCP Client or Server re assigns the IP address

dhcp

I know that DHCP protocol ensures that they don't assign an address which is already assigned to another host. This can be true even when the host has been assigned with a static IP address. Also, that static IP address falls under the range of the DHCP pool address range. In this case, the server will ping the IP address before offering the IP address to the DHCP client. My question is what if the clientA has been assigned with an IP address let's say 192.168.1.10/24 by DHCP server. Now, I have another host in the same subnet and I assign the address with
192.168.1.10/24. Is DHCP server going to re-assign the client A with another IP address just to resolve the conflict? I know that if the order is different and the DHCP is coming later in the picture then DHCP server will ensure that it doesn't apply the conflicting IP address?

Best Answer

According to the DHCP RFC (2131) it is the responsibility of both the server and client to detect duplicate addresses. The server should check using ICMP or similar and the client should check using ARP or similar:

In some environments it will be necessary to reassign network addresses due to exhaustion of available addresses. In such environments, the allocation mechanism will reuse addresses whose lease has expired. The server should use whatever information is available in the configuration information repository to choose an address to reuse. For example, the server may choose the least recently assigned address. As a consistency check, the allocating server SHOULD probe the reused address before allocating the address, e.g., with an ICMP echo request, and the client SHOULD probe the newly received address, e.g., with ARP.

In the case where the client detects it has received a duplicate address, it must reject the address with DHCPDECLINE and then attempt to obtain another address after a backoff period.

The client receives the DHCPACK message with configuration parameters. The client SHOULD perform a final check on the parameters (e.g., ARP for allocated network address), and notes the duration of the lease specified in the DHCPACK message. At this point, the client is configured. If the client detects that the address is already in use (e.g., through the use of ARP), the client MUST send a DHCPDECLINE message to the server and restarts the configuration process. The client SHOULD wait a minimum of ten seconds before restarting the configuration process to avoid excessive network traffic in case of looping.

Note: all of these statements use the SHOULD key word, so although they are recommended, they are not mandatory (apart from the address rejection which is mandatory)

RFC 5227 provides more details on how clients can carry out IPv4 Address Conflict Detection