tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Thinking about "branes" for netbsd...

Dennis Ferguson wrote:
On 5 May, 2012, at 15:33 , Darren Reed wrote:
Dennis Ferguson wrote:

The problem is that, no matter what the ioctl tells the socket
to do, the kernel cannot send a packet out an interface if it
does not have a route to the packet's destination pointing out
that interface.  If the destination is being routed with a
default route then there need to be two default routes (if it
is being routed with some other route there need to be two
of those), one for each interface, which means you need two
forwarding tables to store the different routes in.  It is a
multiple forwarding table problem even if it isn't one that
a "brane" works for.
For reference, you might like to investigate the following
IP socket options that are available on OpenSolaris:
The latter of which is similar to Linux's SO_BINDTODEVICE.
I don't know if Linux has an equivalent of IP_NEXTHOP but
as an ioctl, it works in a similar way (for a particular
socket) as does policy routing with ipfilter. I believe
that either one or both of those are a solution to your
problem without implementing virtual routing tables.

I'm aware of both of those.  I think you may be confused about
what IP_BOUND_IF does (hint: last I looked it only effects
where multicasts and broadcasts go).  IP_NEXTHOP does help if
you think this is solved by having each application do its
own routing (maybe the application could run DHCP to find out
the next hop for that interface's default route too); if all
applications did this then the kernel could get even simpler
by eliminating all forwarding tables.

You want an application to send a packet back out the same
interface that the packet was received on. That amounts to
the application doing its own routing.


Home | Main Index | Thread Index | Old Index