From owner-freebsd-net Wed Dec 4 13:55: 9 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2428837B401 for ; Wed, 4 Dec 2002 13:55:07 -0800 (PST) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB1AC43EBE for ; Wed, 4 Dec 2002 13:55:06 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by rwcrmhc51.attbi.com (rwcrmhc51) with ESMTP id <20021204215506051007sgvle>; Wed, 4 Dec 2002 21:55:06 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA28208; Wed, 4 Dec 2002 13:50:21 -0800 (PST) Date: Wed, 4 Dec 2002 13:50:20 -0800 (PST) From: Julian Elischer To: Don Bowman Cc: "'freebsd-net@freebsd.org'" Subject: RE: SO_DONTROUTE, arp's, ipfw fwd, etc In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 4 Dec 2002, Don Bowman wrote: > > Why does it think the source is local? are the routers below > > doing proxy > > arp? Did you give your interface a netmask of 0,0.0.0? > > > > Who responds to the arp? > > Its a layer-2 MAC rewrite, so it arrives on a local segment, but > subnetting rules don't apply. > No-one responds to the ARP, hence my problem :) Someone must be responding, because the SYN is eventually sent. > > I know what its doing now is normal, its just that it doesn't work > in my configuration (which isn't typical). > > The interface in question has no IP or netmask (or at least, i would > like it to not have one, its not needed). It could have no IP address. Just ifconfig fxp0 up without giving it one.. however IP will refuse to send a packet out that interface. Well maybe.. hmm you could add the default route to be out that interface route add default -face fxp0 but that would still require an ARP because there is no place for the code to get the MAC address from, and an ARP requires a return address. I'm definitly missing some part of the picture here. It works now, but you have extra arps. HOW does it work? Where does it get the destination MAC address from? Here's my suggestion: write a netgraph node that does all the MAC rewriting. Code from the ng_bridge node would be useful. attach it to a ng_iface node. make the netgraph iface the default route. (route add default -iface ng0) basically if has two hooks. On e to attach to the ethernet interface, and one for the ng_iface node that exports ng0. Information gleaned from the incoming packets is used to send out the outgoing packets. Not a very hard node to write but rather specialised. :-) You wouldn't have to touch any General code.. it would be entirely contained within your node. Basically it would look to the system as if you have a point-to-point link to somewhere that is your default route. you send in IP packets and they magically come out the ethernet interface with the correct MAC header on the front. If you startd with the bridge node as a start you could handle having multiple interfaces. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message