Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 13:50:20 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Don Bowman <don@sandvine.com>
Cc:        "'freebsd-net@freebsd.org'" <freebsd-net@freebsd.org>
Subject:   RE: SO_DONTROUTE, arp's, ipfw fwd, etc
Message-ID:  <Pine.BSF.4.21.0212041332530.26728-100000@InterJet.elischer.org>
In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C85337010230FC@mail.sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0212041332530.26728-100000>