From: Denys Fedoryschenko <denys@visp.net.lb>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [RFC] arp announce, arp_proxy and windows ip conflict verification
Date: Fri, 3 Jul 2009 00:22:55 +0300 [thread overview]
Message-ID: <200907030022.55186.denys@visp.net.lb> (raw)
In-Reply-To: <m11voyzu3y.fsf@fess.ebiederm.org>
On Thursday 02 July 2009 23:51:29 Eric W. Biederman wrote:
>
> I just looked at the kernel code in a bit more detail as well as some
> examples. With routing properly setup it appears largely fool proof.
> The relevant piece in arp_process appears to be:
>
> if (addr_type == RTN_UNICAST && rt->u.dst.dev != dev &&
>
> Which says if when we consult the routing tables we would route the
> packet out an interface that it did not come in by do the whole
> proxy arp thing.
>
> Which says to me you do not have a route to the machine which
> is getting a address conflict on the network segment on which it
> is located.
>
> In summary the evidence I have suggests your routing is misconfigured.
>
> Eric
It just have default route. Using it in proxy_arp clearly VIOLATE RFC!
I did small simulated setup.
Example:
default via 10.0.1.1 dev eth1
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2
10.0.1.0/24 dev eth1 proto kernel scope link src 10.0.1.2
eth0 attached to my tap0
defaulthost ~ # sysctl -w net.ipv4.conf.eth0.proxy_arp=1
net.ipv4.conf.eth0.proxy_arp = 1
Testing
home ~ # arping -I tap0 10.0.1.6
ARPING 10.0.1.6 from 10.0.0.1 tap0
Unicast reply from 10.0.1.6 [52:54:00:12:34:56] 85.706ms
Unicast reply from 10.0.1.6 [52:54:00:12:34:56] 0.683ms
^CSent 2 probes (1 broadcast(s))
Received 2 response(s)
!!! Correct. Thats why i need proxy_arp, i can reach hosts in eth1
home ~ # arping -I tap0 5.6.7.8
ARPING 5.6.7.8 from 10.0.0.1 tap0
Unicast reply from 5.6.7.8 [52:54:00:12:34:56] 353.697ms
Unicast reply from 5.6.7.8 [52:54:00:12:34:56] 0.740ms
Unicast reply from 5.6.7.8 [52:54:00:12:34:56] 0.697ms
^CSent 3 probes (1 broadcast(s))
Received 3 response(s)
!!! Not correct. It uses default route as reference "where i can route", which
violates RFC.
Laptop with ip 5.6.7.8 (have nothing to do to with this router) with Windows
XP will not be able to work. He will get ip conflict.
Network , for example, is on unmanaged switches, so i cannot isolate it from
this router.
If i do:
defaulthost ~ # sysctl -w net.ipv4.conf.eth1.medium_id=2
net.ipv4.conf.eth1.medium_id = 2
defaulthost ~ # sysctl -w net.ipv4.conf.eth0.medium_id=2
net.ipv4.conf.eth0.medium_id = 2
home ~ # arping -I tap0 5.6.7.8
ARPING 5.6.7.8 from 10.0.0.1 tap0
^CSent 3 probes (3 broadcast(s))
Received 0 response(s)
Correct. Laptop will not get ip conflict
home ~ # arping -I tap0 10.0.1.6
ARPING 10.0.1.6 from 10.0.0.1 tap0
^CSent 3 probes (3 broadcast(s))
Received 0 response(s)
Not correct. Oops, i cannot talk with 10.0.1.6 anymore, and proxy_arp supposed
to help me with this.
If i set different medium id - it will be same as default, 0.
Any ideas how medium_id will help here?
So once more again, i dont mind proxy_arp main purprose to help devices to
communicate in different physical networks. But if it gives answers to ARP
announce it is WRONG. Because ARP answer for ARP announce(gratitous), it
should only answer if it really knows about ip conflict. In current setup -
if it have ip on this machine.
ARP announce main puprose to update ARP cache AND to check for possible IP
conflicts. proxy_arp current behavior will just screw this idea even without
default issue.
If i have two networks proxy arp'ed
10.0.0.0/24 physical segment
10.0.1.0/24 physical segment
proxy_arp host between them, so users can set on their laptops /22 and
communicate freely like they are in one segment.
Some user with XP on laptop with ip 10.0.0.66/22 will come to 10.0.1.0/24
physical segment. As second he will turn on his laptop - proxy_arp host will
give him incorrect answer to his ARP announce "10.0.0.66 (ff:ff:ff:ff:ff:ff)
tell 10.0.0.66", it will tell "Reply 10.0.0.66 is-at 52:54:00:12:34:56" -
that IP is busy. And thats wrong. arp_proxy should help hosts to communicate,
but should not give incorrect answers that ip is taken.
next prev parent reply other threads:[~2009-07-02 21:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-01 11:44 [RFC] arp announce, arp_proxy and windows ip conflict verification Denys Fedoryschenko
2009-03-13 23:02 ` David Miller
2009-06-30 22:55 ` Eric W. Biederman
2009-06-30 22:54 ` Denys Fedoryschenko
[not found] ` <m1iqicyjmr.fsf@fess.ebiederm.org>
2009-07-01 9:00 ` Denys Fedoryschenko
2009-07-01 9:42 ` Denys Fedoryschenko
2009-07-01 17:40 ` Eric W. Biederman
2009-07-01 18:12 ` Denys Fedoryschenko
2009-07-01 19:01 ` Denys Fedoryschenko
2009-07-02 20:36 ` Eric W. Biederman
2009-07-02 20:51 ` Eric W. Biederman
2009-07-02 21:22 ` Denys Fedoryschenko [this message]
2009-07-02 22:18 ` Eric W. Biederman
2009-07-02 23:03 ` Denys Fedoryschenko
2009-07-02 23:23 ` Eric W. Biederman
2009-07-02 23:46 ` Denys Fedoryschenko
2009-07-03 1:38 ` David Miller
2009-07-03 3:14 ` Eric W. Biederman
2009-07-03 11:02 ` Denys Fedoryschenko
2009-07-03 20:20 ` David Miller
2009-07-03 20:37 ` Denys Fedoryschenko
2009-07-04 0:46 ` Eric W. Biederman
2009-07-04 7:55 ` Denys Fedoryschenko
2009-07-04 15:00 ` Eric W. Biederman
2009-07-04 15:03 ` Denys Fedoryschenko
2009-07-04 21:57 ` Eric W. Biederman
2009-07-04 22:00 ` Denys Fedoryschenko
2009-07-04 23:22 ` Mark Smith
2009-07-05 0:07 ` Eric W. Biederman
2009-07-05 0:28 ` Denys Fedoryschenko
2009-07-05 6:16 ` Mark Smith
2009-07-04 23:47 ` Eric W. Biederman
2009-07-03 1:34 ` David Miller
2009-07-02 23:13 ` Denys Fedoryschenko
2009-07-01 2:27 ` [PATCH] Revert "ipv4: arp announce, arp_proxy and windows ip conflict verification" Eric W. Biederman
2009-07-01 3:10 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907030022.55186.denys@visp.net.lb \
--to=denys@visp.net.lb \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).