lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] IP conflict detecting


From: Bernhard Wiegel
Subject: Re: [lwip-devel] IP conflict detecting
Date: Wed, 28 Jan 2009 18:29:47 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Hi Piero,


    yes. When there is a packet, directed to your IP but to a
    different MAC address then it is pretty clear there is someone
    using your IP.
    usually this is done on Broadcast packets so you can detect it
    also in switched networks. Basically ARP is used.


i didn't understand... i configured emac on my microcontroller to filter ethernet packets, so, only packets for my macaddress OR broadcast ethernet packets are forwarded to microcontroller. So, packets with different mac and different IP are not received, and broadcast ethernet packets have FFFFFFFFFF as mac address (i.e. arp packets), so i cannot detect ip conflict....
ARP uses the broadcast address as it's target address.

You can detect a conflict easily if your device simply does an ARP request with it's own IP address.
If someone else answers, then there is a conflict.

So let's make an example of a device which has the static IP (a.b.c.d)

ARP request: Who has a.b.c.d? Please tell ...

If the device receives a reply ( ARP reply: a.b.c.d is at HW address) the devices IP will conflict with another one on the same subnet.
If there is no reply then the IP is not used by someone else at the moment.

So if you implement this process at startup and your device gets no ARP answer it can be sure that no one else uses this static IP at the moment.

Hope this make it more clear.

Regards,
Bernhard

--
Dipl-Ing Bernhard Wiegel

Universität Ulm - Ulm University
Institut für Organisation und Management von Informationssystemen (OMI) - 
Institute for Information Resource Management

Albert-Einstein-Allee 43
89081 Ulm, Germany Tel: +49 731 - 50 28788
Fax: +49 731 - 50 28789
E-Mail: address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]