Re: Testing duplicate IP address detection
Shahid Mahmood
Wed May 04 10:59:23 2016
On Wed, May 4, 2016 at 6:17 AM, Roy Marples <roy@xxxxxxxxxxxx> wrote:
> Hi
>
> First and foremost, Roy, thanks for taking time out from your busy
schedule. Really appreciate that.
> On 03/05/2016 13:27, Shahid Mahmood wrote:
> > I am trying to test duplicate IP address detection. Started dhcpcd as
> > usual, found out what IP address it got, then manually assigned that
> > address to another host on the network. After that, I did arping and
> > normal ping from the duplicated-ip-host, but there is no indication or
> > event received on the machine running dhcpcd. The reason stays at
> > "BOUND" and 'new_ip_address=' remains to keep showing the same
> > (duplicated) IP.
> >
> > Does anyone know how this feature is actually tested? What should be my
> > expectations from dhcpcd?
>
> dhcpcd DaD behaviour mirrors that of kernel IPv6 DaD in-that DaD is only
> performed when the address is initially assigned to the interface.
> As you say, you assigned the same IP to another node after dhcpcd
> assigned it's address, so here dhcpcd will do nothing.
>
> > (testing on the latest trunk)
>
> The latest trunk still behaves the same way, but for IPv4 it keeps the
> ARP socket open and will warn via syslog about DaD conflicts but it
> won't do anything else about it because I've not decided what that
> action should be as yet.
>
> This is the part I am trying to test. I am not sure I see any indication
on the dhcpcd logs when a duplicate IP sends an arping or ping. All we need
in the application is the ability to detect this situation. Assuming it
does, can this be sent as an event to the hook-script? (alternately, I can
parse the logs but that would be ugly).
In the DHCP server not responding and lease expired case dhcpcd will now
> drop the lease on DaD failure.
>
> I am not able to verify this either. In my test, the IP stays in-tact, and
there is sign of any anomaly reported by dhcpcd.
Can you suggest a test scenario that should work? Maybe I am doing
something wrong.
And thanks again!
> Roy
>
-shahid
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Archive administrator: postmaster@marples.name