1

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?

  • No DHCP normally only checks for duplicates before a client requests an IP address. Also questions about protocols above OSI layer-4 are off-topic here. – user36472 Jul 24 '18 at 5:52
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 25 '18 at 9:06
2

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

0

Several assumptions you make are wrong, but answering your questions:

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?

No. A DHCP doesn't scan the network for conflicts on acknowledged leases. Furthermore, DHCP communication is always initiated by the client, so unless the client sends another discover or lease request the server doesn't do anything.

Additionally, a DHCP server doesn't need to check if the offered address is unused, it's up to the client to check before requesting the address. The server may even be located on another segment and be totally incapable of checking for a duplicate address.

  • I will say read the CCENT Text book - DHCP Chapter – dexterous_stranger Jul 25 '18 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.