Now we're going to talk about ARP duplicate IP detection.
To mitigate problems associated with IP address conflicts,
ARP is used in a duplicate IP address detection process.
This method allows hosts to broadcast their desire to use a
particular IP address in an effort to see if any other nodes on
the LAN already are using the IP.
This process begins with the IP address assignment regardless of
whether that assignment is through static,
DHCP, or even from the automatic Private IP Address Assignment,
or APIPA method.
The host broadcasts a series of three special ARP IP detection
packets to the LAN and waits for any response which would tell it
that IP address is already in use.
These packets have a unique ARP format,
they use the option code 1 for an ARP request,
but unlike any other ARP request,
the sender's IP and the target MAC is set to all zeros.
This has two effects.
It makes this an IP detection ARP which LAN hosts can recognize and it
prevents nodes from using this to update their ARP cache,
which if they did, might lead to false information.
Finally,
notice that the requested IP address is set in the target IP address field.
In this scenario,
assuming the IP address is free and there is no ARP reply
announcing the IP address is already in use,
the client will accept the IP address for use,
and send a gratuitous ARP to announce itself on the LAN
and update other host's ARP caches.
In the case where the IP address already is in use,
the process diverges to handle the situation and prevent
duplicate IP addresses on the LAN.
It begins the same way with the IP address assignment.
Again, it is irrelevant how the IP address was assigned.
The host broadcasts the ARPs with a sender IP and target MAC
set to zeros and the requested IP and target IP field and
waits for conflict responses.
In my experience,
rarely do all three need to be sent before the owner sends the ARP response.
In this case,
the IP is in use and the owner responds with an ARP reply to
the requestor with its IP and Mac in the center field and the
requestor's MAC in the target field.
However, take note that the target IP is set to all zeros,
this alerts the requestor that the IP is in use.
At this point,
the requestor will have to find another method of IP address assignment.
Most systems fall back on the APIPA standard and
self-assign an address starting with 169.
254.
Even when they do this,
they will still follow the same IP conflict detection rules to see
if the assigned APIPA address is already in use.
I do want to take the time to let you know that the IP detection
process outlined here is not always followed.
It will depend on the operating system vendors implementation.
In some cases, such as certain flavors of UNIX and Linux,
there is no detection,
but the assumption that the assigned IP address was
properly assigned and freely available.
This will naturally lead to communication issues on both
hosts assigned the conflicting IP.
And of course, if this is the case, it will be up to the administrators to find and solve the problem.