Subject: Re: proxy arp for foreign addresses
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Grant Beattie <grant@grunta.com>
List: tech-net
Date: 11/04/2001 19:42:53
On Sun, Nov 04, 2001 at 03:07:00AM -0500, der Mouse wrote:

> > # arp -s 1.5.1.1 00:a0:c9:39:60:27 pub
> > cannot intuit interface index and type for 1.5.1.1
> 
> I don't know whether it will work with a _proxy_ arp entry, but when I
> was playing with arp entries and such, I found them to be
> interface-specific, but this specificity was not reflected back to the
> command-line by the provided tools.  (Note that the message implies
> that arp is trying to "intuit" some stuff, but gives you no way to
> override this in case you want something other than its guess, or in
> case its intuiting fails.

Perhaps a new flag to /usr/sbin/arp which forces a particular
interface... don't know if that's the right way to go about it,
however.

> You may find yourself needing to throw together a tool that gives you
> command-line access to the specific interface you need.  (If even that
> works, of course; it might not.)  I can send you code extracted from a
> program I wrote that adds arp entries pointing out "unusual"
> interfaces.  Unlike your case, the address I wanted to add an entry for
> was one the box had, but arp's guess was wrong for my application.

Indeed.

> One thing that might work is to add the address you want to the
> interface you want, add the arp entry, and then delete the address:
> 
> # ifconfig fxp0 alias 1.5.1.1/32
> # arp -s 1.5.1.1 ..:..:..:..:..:.. pub
> # ifconfig fxp0 delete 1.5.1.1
> 
> Or perhaps 1.5.1.0/28 or something instead.

# ifconfig fxp0 alias 1.5.1.1/32
# arp -s 1.5.1.1 00:a0:c9:39:60:27 pub
set: proxy entry exists for non 802 device

> > is it not possible to proxyarp for a foreign address?
> 
> I think the theory is that if the address wouldn't normally fall on
> that cable, nobody will arp for it on that cable.  Then "wouldn't
> normally fall on that cable" is equated to "we don't have an interface
> address implying it falls on that cable", and the problem you see
> arises.

That's exactly what I'm trying to circumvent :)

On Solaris(2.7), it's not possible unless you add an if route, which
forces it to listen/reply on a specific interface. Without the route,
adding the arp won't work at all.

My preference would be to be able to force the interface with an
option, rather than having to use routes.

g.

-- 
Get NetBSD: www.netbsd.org            ``Of course it runs NetBSD.''