2 isps 2 subnets how to route local traffic across them

pjr

n00b
Joined
Sep 7, 2009
Messages
14
In my home network I need to force certain devices to use specific ISPs.
The networks are currently configured as follows

ATT --> DSL Modem --> Linksys wrt-54g running tomato --> 192.168.2.0 sub-net

Comcast --> cable modem --> Asus AC-68U --> 192.168.1.0 sub-net

this configuration works fine but doesn't allow any devices to see the devices on the other sub-net which means no NAS access printer access etc...

In addition to the above I have a Raspberry PI with 2 wired Ethernet ports (one via a USB adapter) I hope to use as a router to connect the two 192.168 networks.

another thought is does tomato or ddwrt offer dual wan modes that you can force devices to specific wans instead of fail over and load balance?

I am very technical but this is beyond my network skills thanks in advance for all suggestions or guidance
 
You can skip all of that by expanding the subnet mask to 255.255.252.0.
This makes your range 192.168.0.0 - 192.168.3.255

I'm assuming you already have dhcp disabled on at least one if not both routers since it appears you have a flat network layout.

An alternative, even easier is to disable DHCP on the WRT54G, make its IP 192.168.1.2 and statically assign whatever devices should use it the appropriate default gateway.
 
If eth0 and eth1 are your internet connected ports this will route all traffic from 192.168.1.0/24 to eth0 and 192.168.2.0/24 to eth1
Doing it this way works with dhcp addresses on the internet connections.

route add 192.168.1.0/24 dev eth0
route add 192.168.2.0/24 dev eth1
Then set default route to catch any others.
 
I want/need to use both ISPs and have devices direct their traffic to a specific ISP I don't want load balance or round robin.....
 
You can skip all of that by expanding the subnet mask to 255.255.252.0.
This makes your range 192.168.0.0 - 192.168.3.255

I'm assuming you already have dhcp disabled on at least one if not both routers since it appears you have a flat network layout.

An alternative, even easier is to disable DHCP on the WRT54G, make its IP 192.168.1.2 and statically assign whatever devices should use it the appropriate default gateway.

both networks are completely independent now so each router provide DHCP for its network
 
I don't understand here. You want to have seperate networks using their own ISP. But yet, you still want to have them see each other for NAS and printing?

Sorry, not possible, you need a "DMZ" subnet to put the NAS/printing on. You'll need additional equipment. Like another router for this.
Just add some static routes for the "DMZ" subnets, to point to the 3rd router.

Like this: 192.168.3.0 255.255.255.0 192.168.3.1 (3rd router interface).
 
Last edited:
I was pretty sure I would need more equipment :)

out of curiosity doesn't windows offer you the ability to "bridge" Networks, wold that work?
 
This may not be what you'd like to do, but it's a solution: use pfSense and policy based routing. You connect both ISP modems to the pfSense box, then your LAN interface to your switch. Put all devices under a single subnet. Then your policies in the firewall say:

FROM 192.168.1.100-150 TO Any-External/Internet VIA ISP1
FROM 192.168.1.151-200 TO Any-External/Internet VIA ISP2

or you can do Router on a Stick with your Rasp Pi: http://stu.radnidge.com/post/49199786216

Your Rasp Pi would only need 1 LAN interface with 2 IPs and some manual routes put in on the clients.
 
Connect the Pi to both networks with fixed IPs and set it up to route. The preferred method would then be to add a static route to each device on both networks pointing the other network to the Pi. A less desirable method would be to add static routes to each router pointing traffic bound for the other private network back out the inbound interface to the Pi. This is called hair pinning. I can't speak for toy routers but most enterprise routers will allow you to do that. Please note depending on your traffic patterns this could bring your router to its knees. It isn't clean but it will work.
 
This is relevant to my interests. I want to do this in PFSense for both wan which are on separate subnets..
 
Last edited by a moderator:
Back
Top