All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos Velasco" <carlosev@newipnet.com>
To: "Julian Anastasov" <ja@ssi.bg>
Cc: netdev@oss.sgi.com
Subject: Re: Bug? ARP with wrong src IP address
Date: Thu, 24 Jul 2003 01:34:03 +0200	[thread overview]
Message-ID: <200307240134030339.1EADABD4@192.168.128.16> (raw)
In-Reply-To: <Pine.LNX.4.44.0307240149480.1181-100000@u.domain.uli>

On 24/07/2003 at 2:01 Julian Anastasov wrote:

>> When linux machine tries to find out the mac address of 192.168.128.60
>with
>> ARP, it uses the loopback IP address (lo:2) as source insted of the IP
>address
>> of the ethernet interface (eth0).
>
>	You are right but the kernel tries to preserve the sender's
>IP. This helps the receiver to select the best interface
>to answer this ARP probe - the same where the IP packet will be
>accepted later. As there are different setups, the tuning of the
>ARP handling can be done better with user tools such as arptables
>and iparp.

Julian,

The linux box is trying to do an ARP request with a source IP address that has not sense in that ethernet network. It's imposible to obtain a reply in that way. Although the receiver would have a route to the loopback address through ethernet interface it would never reply such a ARP request.
IMHO it's a bug. Loopback IP address has not any sense on the eth0 network.

Linux receives the packet destination loopback address and then performs a lookup in the route table to reach the src address.
It takes the route (ex. default) and is on eth0 interface, then does the arp request.
As the route is in eth0, it must use the src IP address of eth0, not the loopback address.

If we have more than 1 IP address in eth0 (eth:0, eth:1) I suppose that the route table must distinguish the right interface for ARP.

I have tried to reproduce the same problem with a Cisco router with IOS 12.2(15)T5, but it works fine in Cisco.
I will try to test on Solaris 8, but I think the only problem is in linux.


>http://sourceforge.net/projects/ebtables/
>http://www.ssi.bg/~ja/#iparp

I didn't know about these tools.
I have taken a look on them, but they seem to be used for arp filtering?
I can't see how these tools can help me into this.

My workaround with linux is to use static arps for solving this problem (arp -s).

Regards,
Carlos Velasco

  reply	other threads:[~2003-07-23 23:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 15:12 Bug? ARP with wrong src IP address Carlos Velasco
2003-07-23 15:25 ` Carlos Velasco
2003-07-23 23:01 ` Julian Anastasov
2003-07-23 23:34   ` Carlos Velasco [this message]
2003-07-24  9:30     ` Bart De Schuymer
2003-07-24 10:38       ` Carlos Velasco
2003-07-24 11:04         ` Julian Anastasov
2003-07-24 15:28           ` Carlos Velasco
2003-07-24 15:54             ` Julian Anastasov
2003-07-24 16:04               ` Carlos Velasco
2003-07-24 16:32                 ` Julian Anastasov
2003-07-24 16:36                   ` Carlos Velasco
2003-07-24 18:11                     ` Carlos Velasco
2003-07-24 18:37                       ` David S. Miller
2003-07-24 18:54                         ` Carlos Velasco
2003-07-24 16:10               ` David S. Miller
2003-07-25 18:24                 ` Carlos Velasco
2003-07-25 18:46                   ` David S. Miller
2003-07-25 18:36                     ` Carlos Velasco
2003-07-25 18:59                       ` David S. Miller
2003-07-25 19:23                         ` Carlos Velasco

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=200307240134030339.1EADABD4@192.168.128.16 \
    --to=carlosev@newipnet.com \
    --cc=ja@ssi.bg \
    --cc=netdev@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.