From owner-freebsd-net@FreeBSD.ORG Tue Mar 2 13:43:50 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDDDF1065674 for ; Tue, 2 Mar 2010 13:43:50 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4408FC25 for ; Tue, 2 Mar 2010 13:43:49 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o22DhQCS030748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Mar 2010 14:43:26 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o22DhNsF050253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 14:43:23 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o22DhNpu076843; Tue, 2 Mar 2010 14:43:23 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o22DhNKi076842; Tue, 2 Mar 2010 14:43:23 +0100 (CET) (envelope-from ticso) Date: Tue, 2 Mar 2010 14:43:23 +0100 From: Bernd Walter To: Anton Yuzhaninov Message-ID: <20100302134323.GA58319@cicely7.cicely.de> References: <20100301223327.GQ58319@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: freebsd-net@freebsd.org Subject: Re: net/mpd5: proxy arp don't work on FreeBSD 8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 13:43:50 -0000 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: > > 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 http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.