Questions about ARP

Steven Scholz steven.scholz at imc-berlin.de
Tue Aug 12 22:34:12 EST 2003


Dan Malek wrote:

 > Steven Scholz wrote:
 >
 >> But when I connect my MPC8xx board with Linux it seems that Linux is
 >> not responding to the ARP requests done by the Windows machine.
 >> Result: Both machine end up with the same IP address.
 >
 >
 > Fortunately, Linux isn't Windows......you are going to find lots of
 > Windows "standard" protocols that aren't documented nor supported by
 > anyone else.
 >
 >> Did I miss something?
 >
 >
 > Well, Microsoft did.....there is RFC2131 that describes how you are
 > supposed to use an ARP to respond to a duplicate IPv4 used on the
 > network.  It is commonly used to ensure you don't have systems
 > manually configured or not honoring leases when DHCP is handing out
 > dynamic IP addresses.  Everyone else seems to implement this properly.

Finaly I found the point you're talking about.
Linux is answering the ARP packets with Source Address 0.0.0.0 (see net/ipv4/arp.c):

         /* Special case: IPv4 duplicate address detection packet (RFC2131) */
         if (sip == 0) {
                 if (arp->ar_op == htons(ARPOP_REQUEST) &&
                     inet_addr_type(tip) == RTN_LOCAL)
                         arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr);
                 goto out;
         }

Windows is checking for duplicate addresses using ARP packets with source _and_
destination address set to the address in question. So of course Linux won't answer it!

But I can't find a single word in the RFC2131 (http://www.faqs.org/rfcs/rfc2131.html)
saying that the Source Address _must_ set to 0.0.0.0!!!!

So the attached patch will make M$ Windows happy and APIPA working.

Thanks,

Steven
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linux-2.4.20-APAPI.patch
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20030812/154447ad/attachment.txt 


More information about the Linuxppc-embedded mailing list