Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2010 14:43:23 +0100
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Anton Yuzhaninov <citrin@citrin.ru>
Cc:        freebsd-net@freebsd.org
Subject:   Re: net/mpd5: proxy arp don't work on FreeBSD 8
Message-ID:  <20100302134323.GA58319@cicely7.cicely.de>
In-Reply-To: <hmidhl$lj9$1@dough.gmane.org>
References:  <hmgmol$alh$1@dough.gmane.org> <20100301223327.GQ58319@cicely7.cicely.de> <hmidhl$lj9$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 02, 2010 at 07:08:37AM +0000, Anton Yuzhaninov wrote:
> On Mon, 1 Mar 2010 23:33:27 +0100, Bernd Walter wrote:
> BW> On Mon, Mar 01, 2010 at 03:33:41PM +0000, Anton Yuzhaninov wrote:
> >> mdp can't add proxy arp record. From mpd logs:
> >> 
> >> Mar  1 15:10:34 x0001 mpd: [B-1] IFACE: Add address 10.25.1.240/32->10.25.1.241 to ng0
> >> Mar  1 15:10:34 x0001 mpd: [B-1] exec: /usr/sbin/arp -S 10.25.1.241 0:15:17:35:1c:22 pub
> >> Mar  1 15:10:34 x0001 mpd: [B-1] system: command "/usr/sbin/arp" returned 256
> >> 
> >> Same command from shell:
> >> 
> >> # arp -S 10.25.1.241 0:15:17:35:1c:22 pub
> >> delete: cannot locate 10.25.1.241
> >> cannot intuit interface index and type for 10.25.1.241
> BW> 
> BW> It looks like you don't have a network configured for 10.25.1.241, so
> BW> arp(8) can't find the interface to configure the ARP entry to.
> BW> You either need to supply -i in case the host shouldn't get a local
> BW> IP in the given network or configure the interface to be a real part
> BW> of it.
> 
> Network for this ip is configured. Before ng0 created:
> 
> # route -n get 10.25.1.241
>    route to: 10.25.1.241
> destination: 10.25.1.0
>        mask: 255.255.255.0
>   interface: vlan408
>       flags: <UP,DONE>
> 
> When ng0 is created route get point to ng0.

Ok - looks like you've done everything right.
I remember that it was broken when new ARP code went in, but thought it
was fixed already before FreeBSD-8 came out.

I get an ugly error message on current, but at least it setups the address:
[98]chipmunk.cicely.de# arp -an
? (10.1.1.9) at 00:1c:c0:94:2c:d7 on vlan0 expires in 1016 seconds [vlan]
? (10.1.1.38) at 00:0e:42:02:00:42 on vlan0 permanent [vlan]
? (10.1.1.4) at 00:0e:42:02:00:21 on vlan0 expires in 1076 seconds [vlan]
? (10.1.1.16) at 00:1c:c0:30:16:a1 on vlan0 expires in 1195 seconds [vlan]
[99]chipmunk.cicely.de# arp -S 10.1.1.179 0:e:42:2:0:42 pub
arp: writing to routing socket: Invalid argument
[100]chipmunk.cicely.de# arp -an
? (10.1.1.9) at 00:1c:c0:94:2c:d7 on vlan0 expires in 1194 seconds [vlan]
? (10.1.1.38) at 00:0e:42:02:00:42 on vlan0 permanent [vlan]
? (10.1.1.4) at 00:0e:42:02:00:21 on vlan0 expires in 1037 seconds [vlan]
? (10.1.1.179) at 00:0e:42:02:00:42 on vlan0 permanent published [vlan]
? (10.1.1.16) at 00:1c:c0:30:16:a1 on vlan0 expires in 1186 seconds [vlan]
[101]chipmunk.cicely.de# arp -d 10.1.1.179
10.1.1.179 (10.1.1.179) deleted
[102]chipmunk.cicely.de# arp -an
? (10.1.1.9) at 00:1c:c0:94:2c:d7 on vlan0 expires in 1186 seconds [vlan]
? (10.1.1.38) at 00:0e:42:02:00:42 on vlan0 permanent [vlan]
? (10.1.1.4) at 00:0e:42:02:00:21 on vlan0 expires in 1029 seconds [vlan]
? (10.1.1.16) at 00:1c:c0:30:16:a1 on vlan0 expires in 1199 seconds [vlan]

But with a route added for this IP arp fails completely:
[104]chipmunk.cicely.de# ifconfig vlan3 10.1.89.1/24
[105]chipmunk.cicely.de# route add 10.1.1.179/32 10.1.89.92
add net 10.1.1.179: gateway 10.1.1.92
[106]chipmunk.cicely.de# arp -S 10.1.1.179 0:e:42:2:0:42 pub
delete: cannot locate 10.1.1.179
set: proxy entry exists for non 802 device
Exit 1
[107]chipmunk.cicely.de# arp -an
? (10.1.89.1) at 00:0e:42:02:00:42 on vlan3 permanent [vlan]
? (10.1.1.9) at 00:1c:c0:94:2c:d7 on vlan0 expires in 1199 seconds [vlan]
? (10.1.1.38) at 00:0e:42:02:00:42 on vlan0 permanent [vlan]
? (10.1.1.4) at 00:0e:42:02:00:21 on vlan0 expires in 1080 seconds [vlan]
? (10.1.1.16) at 00:1c:c0:30:16:a1 on vlan0 expires in 1184 seconds [vlan]
[108]chipmunk.cicely.de# arp -i vlan0 -S 10.1.1.179 0:e:42:2:0:42 pub
arp: -i not applicable to this operation
Exit 1
[109]chipmunk.cicely.de# uname -a
FreeBSD chipmunk.cicely.de 9.0-CURRENT FreeBSD 9.0-CURRENT #23 r204418:204463M: Sun Feb 28 18:45:04 CET 2010     ticso@cicely14.cicely.de:/data/builder/arm-current/head/sys/arm/compile/FBOX  arm

So yes - it looks like it is still broken for proxy-ARP.
I don't heve enough clue about ARP code in FreeBSD to fix it.
You should file a PR so it can get picked up by the guys who designed
the new code.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100302134323.GA58319>