dhcpcd-discuss

Re: Testing duplicate IP address detection

Roy Marples

Wed May 04 13:38:46 2016

On 04/05/2016 11:58, Shahid Mahmood wrote:
>     > (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.

Test box 1:
dhcpcd -dB4l 10 --lastleaseextend iwn0
Wait for it to get a DHCP lease, turn off the server and let it expire.
dhcpcd will notify you of this.

Text box 2 (same L2 network)
ifconfig bge0 $ip_of_textbox_1/$netmask
This sends a gratuitous ARP which test box 1 picks up as a duplicate
address and drops it's lease.

Roy

Follow-Ups:
Re: Testing duplicate IP address detectionShahid Mahmood
References:
Testing duplicate IP address detectionShahid Mahmood
Re: Testing duplicate IP address detectionRoy Marples
Re: Testing duplicate IP address detectionShahid Mahmood
Archive administrator: postmaster@marples.name