Two Networks on one System

Elliot Finley efinley.lists at gmail.com
Mon Jun 20 23:46:42 UTC 2011


On Mon, Jun 20, 2011 at 4:58 PM, Jon Radel <jon at radel.com> wrote:
>
> On 6/20/11 6:30 PM, Gary Gatten wrote:
>
>> I was kinda going this route as well - policy based routing type thing,
>> but, is there an "easier" way?
>
> Not that I know of given a constraint of completely disjoint networks.
> However, I won't be too terribly surprised if somebody comes up with
> something elegant that makes us all go, "Ooooooo, what a disgustingly neat
> hack."

If it's two completely disjoint networks, the two networks don't use
overlapping IP space and the IP space on at least one of the networks
is known, then just use standard routing.  put in static routes for
the known space and a default route on the other interface for the
unknown space.

If the two networks are using overlapping space, then the only way to
differentiate the packets are which interface they came in... then
you'll have to use a PF hack.

Elliot


More information about the freebsd-questions mailing list