* RE: Questions about ARP
@ 2003-08-12 14:05 Dave Ellis
2003-08-12 15:40 ` Dan Malek
2003-08-12 19:22 ` Re[2]: " Ricardo Scop
0 siblings, 2 replies; 7+ messages in thread
From: Dave Ellis @ 2003-08-12 14:05 UTC (permalink / raw)
To: 'Steven Scholz'; +Cc: 'LinuxPPC', 'Dan Malek'
Steven Scholz wrote:
> 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!!!!
It is actually in RFC1541 "... The client may
perform a check on the suggested address to ensure that the address
is not already in use. For example, if the client is on a network
that supports ARP, the client may issue an ARP request for the
suggested request. When broadcasting an ARP request for the
suggested address, the client must fill in its own hardware address
as the sender's hardware address, and 0 as the sender's IP address,
to avoid confusing ARP caches in other hosts on the same subnet."
Dave
Dave Ellis
~~~~~~~~~~~~~~~~~~~~~~~~~~
SIXNET - "Leading the Industrial Ethernet Revolution"
331 Ushers Road, P.O. Box 767, Clifton Park, NY 12065 USA
Tel +1 (518) 877-5173 Fax +1 (518) 877-8346
Email me at: dge@sixnetio.com
Detailed product info: www.sixnetio.com
~~~~~~~~~~~~~~~~~~~~~~~~~~
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Questions about ARP
2003-08-12 14:05 Questions about ARP Dave Ellis
@ 2003-08-12 15:40 ` Dan Malek
2003-08-12 19:22 ` Re[2]: " Ricardo Scop
1 sibling, 0 replies; 7+ messages in thread
From: Dan Malek @ 2003-08-12 15:40 UTC (permalink / raw)
To: Dave Ellis; +Cc: 'Steven Scholz', 'LinuxPPC'
Dave Ellis wrote:
> It is actually in RFC1541 "... The client may .....
Thank you.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re[2]: Questions about ARP
2003-08-12 14:05 Questions about ARP Dave Ellis
2003-08-12 15:40 ` Dan Malek
@ 2003-08-12 19:22 ` Ricardo Scop
1 sibling, 0 replies; 7+ messages in thread
From: Ricardo Scop @ 2003-08-12 19:22 UTC (permalink / raw)
To: linuxppc-embedded
It is _also_ in RFC2131:
"The client SHOULD perform a
check on the suggested address to ensure that the address is not
already in use. For example, if the client is on a network that
supports ARP, the client may issue an ARP request for the suggested
request. When broadcasting an ARP request for the suggested address,
the client must fill in its own hardware address as the sender's
hardware address, and 0 as the sender's IP address, to avoid
confusing ARP caches in other hosts on the same subnet."
-Scop.
Tuesday, August 12, 2003, 11:05:40 AM, you wrote:
DE> Steven Scholz wrote:
>> 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!!!!
DE> It is actually in RFC1541 "... The client may
DE> perform a check on the suggested address to ensure that the address
DE> is not already in use. For example, if the client is on a network
DE> that supports ARP, the client may issue an ARP request for the
DE> suggested request. When broadcasting an ARP request for the
DE> suggested address, the client must fill in its own hardware address
DE> as the sender's hardware address, and 0 as the sender's IP address,
DE> to avoid confusing ARP caches in other hosts on the same subnet."
[]'s, Scop mailto:scop@digitel.com.br
--------------------------------------------------------------------
"Ninety-eight percent of the adults in this country are decent,
hard-working, honest citizens. It's the other lousy two percent that
get all the publicity. But then -- we elected them." ~Lily Tomlin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Questions about ARP
@ 2003-08-08 15:04 Steven Scholz
2003-08-08 18:24 ` Dan Malek
0 siblings, 1 reply; 7+ messages in thread
From: Steven Scholz @ 2003-08-08 15:04 UTC (permalink / raw)
To: LinuxPPC
Hi there,
Microsoft uses "Automatic Private IP Addressing" to grab an IP address
if a DHCP request fails.
In the section "Resolving IP Conflicts" in
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=7464
it says
How does the client know the IP address it's using isn't in use by
another machine? It uses a gratuitous Address Resolution Protocol
(ARP) to resolve potential conflicts. Let’s say the first client that
boots up wants to assign itself an IP address of 169.254.10.20. It
sends out a gratuitous ARP, but no one answers, so it keeps the
address ... Next, a third client boots up and picks 169.254.10.20, the
same address the first client chose. The first client tells the third
client that it's already using that IP address, so the third client
tries a different IP address and keeps it if there's no conflict.
I can see this behaviour if I connect an embedded DOS TCP/IP device to
a Windows XP computer (using a cross-linked twisted pair) and force
the IP of the DOS device to be the same as the one that the Windows XP
computer is going to claim. Fair enough.
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.
Did I miss something?
I did not find an kernel option saying something about ARP...
Any ideas?
Could someone maybe try this as well? Please?
Thanks a million,
Steven
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Questions about ARP
2003-08-08 15:04 Steven Scholz
@ 2003-08-08 18:24 ` Dan Malek
2003-08-12 12:34 ` Steven Scholz
0 siblings, 1 reply; 7+ messages in thread
From: Dan Malek @ 2003-08-08 18:24 UTC (permalink / raw)
To: Steven Scholz; +Cc: LinuxPPC
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.
> I did not find an kernel option saying something about ARP...
That's because it implements the standard protocols by default.
> Any ideas?
Run DHCP or properly manually configure your Linux system. I don't
know how old your Linux kernel is for the 8xx, but this support for
RFC2131 has been in Linux for a very long time.
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Questions about ARP
2003-08-08 18:24 ` Dan Malek
@ 2003-08-12 12:34 ` Steven Scholz
2003-08-12 15:39 ` Dan Malek
0 siblings, 1 reply; 7+ messages in thread
From: Steven Scholz @ 2003-08-12 12:34 UTC (permalink / raw)
To: Dan Malek; +Cc: LinuxPPC, Brad Parker
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
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
[-- Attachment #2: linux-2.4.20-APAPI.patch --]
[-- Type: text/plain, Size: 730 bytes --]
+ diff -u ./net/ipv4/arp.c.APAPI ./net/ipv4/arp.c
--- ./net/ipv4/arp.c.APAPI Tue Aug 12 13:00:59 2003
+++ ./net/ipv4/arp.c Tue Aug 12 14:32:40 2003
@@ -760,6 +760,18 @@
goto out;
}
+#define MAKE_MS_WINDOWS_HAPPY
+#ifdef MAKE_MS_WINDOWS_HAPPY
+ /* Special case: IPv4 duplicate address detection packet (MS Windows) */
+ if (inet_addr_type(sip) == RTN_LOCAL) {
+ printk("ARP: IPv4 duplicate address detection packet (MS Windows)\n");
+ 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;
+ }
+#endif
+
if (arp->ar_op == htons(ARPOP_REQUEST) &&
ip_route_input(skb, tip, sip, 0, dev) == 0) {
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Questions about ARP
2003-08-12 12:34 ` Steven Scholz
@ 2003-08-12 15:39 ` Dan Malek
0 siblings, 0 replies; 7+ messages in thread
From: Dan Malek @ 2003-08-12 15:39 UTC (permalink / raw)
To: Steven Scholz; +Cc: LinuxPPC, Brad Parker
Steven Scholz wrote:
> 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!!!!
I don't remember if it was in RFC2131 or RFC1541. RFC2131 is an updated
version of RFC1541, so I thought the words would still be there. In
any case it suggests as part of a DHCP the client tests to ensure the
address isn't already in use by sending a ARP using the sender hardware
address and setting the sender IP address to zero to avoid confusing
ARP caches in other hosts on the network. I don't remember the exact
words, but RFCs tend to be terse and concise in the area where you
need to pay attention to detail :-)
I'd suggest using the linux kernel or some networking mailing lists
to discuss this. I wouldn't apply this patch because it seems to be
wrong in the eyes of the RFCs, and I could never get it pushed into
the network portion of the source tree.
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-08-12 19:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-12 14:05 Questions about ARP Dave Ellis
2003-08-12 15:40 ` Dan Malek
2003-08-12 19:22 ` Re[2]: " Ricardo Scop
-- strict thread matches above, loose matches on Subject: below --
2003-08-08 15:04 Steven Scholz
2003-08-08 18:24 ` Dan Malek
2003-08-12 12:34 ` Steven Scholz
2003-08-12 15:39 ` Dan Malek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).