How can I link two separate internal networks to two separate external networks

Geoff Roberts geoff at apro.com.au
Mon Dec 22 12:07:02 UTC 2008


Hi,

I have a FreeBSD 7.0 box with pf.

I have two internal networks (intnet0 and intnet1) and two internal networks 
(extnet0 and extnet1).

extnet0 and extnet1 are two different gateways to the internet.

I only have one physical internal (int0) and one physical external (ext0) 
interface.

Traffic from intnet0 needs to go out on extnet0

Traffic from intnet1 needs to go out on extnet1 (consider this a default route 
for any traffic not going out on extnet0).

What are some suggested ways of doing this?

Assume addresses are (these are made up, but hopefully help paint the 
picture):

intnet0 - 192.168.50.0/24
extnet0 - 10.10.10.8/30
 - extnet0 address 10.10.10.8.10
 - default route 10.10.10.9
 - broadcast 10.10.10.11

intnet1 - 192.168.60.0/24
extnet1 - 10.10.10.12/30
 - extnet1 address 10.10.10.14
 - default route 10.10.10.13
 - broadcast 10.10.10.15

So far I have created vlans via a switch on each interface to "multiplex" the 
connections:

vlan10 - 192.168.50.0/24 and vlan20 - 192.168.60.0/24 come in on a single 
cable to int0.

vlan50 - 10.10.10.8/30 and vlan60 - 10.10.10.12/30 come in on a single cable 
to ext0.

However, since I have the defaultroute set for 10.10.10.13 all traffic from 
intnet0 is going out on vlan60 whereas i want it to go out on vlan50.

Am I going about this the wrong way?

Thanks,

Geoff



More information about the freebsd-questions mailing list