Two internet connections, direct traffic

orangefork

Reputable
Dec 7, 2014
11
0
4,510
Hello, I have a question about using connecting 2 networks with different internet connections each.


I want to direct the internet access of 2 devices (and others in the future) through a specific connection, a DSL connection that fails often but it's at least unlimited. For the other devices in the house and further extended to a business I use a 3g usb stick modem, which has a 10GB/month data plan.

The 2 devices I want to go to the DSL for internet are a Roku and a Synology Diskstation (that will be used to download tasks) and possibly other devices that would be downloading a lot of data from the internet.

I have no need for different networks other than the fact that I have 2 internet connections and don't want the Roku or Diskstation using the 3G connection.

I have an Asus RT-N16 with Tomato Shibby firmware with the 3G usb dongle connected to the internet. It has a Linksys cheap little router working as a range extender AP. It's wired to the Asus and gives WiFi access to the business devices.

For the DSL connection, I have a 2wire modem/router provided by the ISP, that can be put in Bridge mode (only modem) if necessary. It has 4 LAN ports that could be used for the Diskstation and the Roku.

I also have an extra Asus RT-N16 router, with stock firmware just in case it's needed.

I think I can't use the WAN port of the ASUS to connect to the 2wire since to activate that port I would have to deactivate the 3G connection. If connected thru a LAN port, it would activate the DHCP service.

How would you do it?

My most important need is that the Roku and the Diskstation NEVER use the 3G connection, because I could use all the 10GB and the business has to have internet all the time. But I want to be able to access the Diskstation from any device without having to disconnect from one network and connect to the other.

(if you need more info please ask)
 
Solution
Yes the key here is one of the 2 routers must disable the DHCP.

It does not matter a lot which device runs the DHCP. You will only have a single subnet but you will have multiple exit gateways addresses.

Which device to run DHCP sometime is tricky to decide. First if you have a device that only supports DHCP and you can not set a static IP or gateway then you must have the router that device needs provide the IP via DHCP. Get massively complex if you would have 2 devices that support DHCP only and you want one to use one router and one to use the other.

If this is not a issue then you next selection criteria is which network has more devices especially ones that come and go to other networks. Just for ease you want to run...

orangefork

Reputable
Dec 7, 2014
11
0
4,510



I'm using the 3G usb dongle to provide internet to many devices, it's connected to the Asus router with Tomato Shibby firmware through one of the USB ports.

It's basically my main internet connection. The DSL connection fails a lot.
 

orangefork

Reputable
Dec 7, 2014
11
0
4,510


I know, but I have no options.

I'm in a very small town in Mexico, Infinitum is my DSL ISP (owned by Telmex) and it has always sucked, but lately it has gotten worse, to the point I lose internet connection every 2 hours, and for sometimes it doesn't come back for hours. Add to that that when I have internet, it's very slow.

I'm currently paying about 45 dls/month for 10GB, but it's necessary, since the business needs internet to receive credit cards, besides other services.

I pay around 20 dls for the DSL service, and I'm keeping it. At some point they have to fix the service.

So, those are my options. There is no other ISP in the area, only Cellular (and of course satellital which would be much more expensive).

Now that you know why I'm doing this, can you share how would yo do it?
 

orangefork

Reputable
Dec 7, 2014
11
0
4,510


There are no other options!

Infinitum is the only wired ISP here. I repeat, I'm in a very small town. Around 1500 people.

I'm not dropping the Cellular connection. I'm working with what I have.

Without judgement on my options, care to help me?
 
I see this thread got way off track.

It will take some effort but you can use your asus with the tomato firmware as a dual wan router.....at least I am pretty sure I use dd-wrt mostly but there is not a huge difference.

What you do is plug the DSL device into the asus. Best if you run the DSL as a bridge but it can run as a router as long as you can tolerate the double nat.

Now the tricky part is matching the source IP or mac address and directing it to the proper internet connection. Some firmware has this via gui but all do it with the IPTABLES command behind the scenes. This is a nasty complex command so I will let you read the documentation on it because this is also the command that does the NAT.

It can also be done on the end devices but that does not always work when the device can only learn stuff via DHCP. In your case you might be able to make it work. Run your DSL router as the main giving out DHCP. Now assign the asus with the 3g modem a different ip and turn off the DHCP. plug the devices together on the lan ports. Now lets say your main router is 192.168.0.1 and the asus is 192.168.0.2. What you can do is manually set those devices you want to use the 3g to have a gateway of 192.168.0.2 It is also possible with the ROUTE command on the pc to run certain internet locations on one connection and some on other. It get very complex quickly when you try to use the ROUTE command to use both since you must manually key in all the ip for the secondary connection to use.
 

orangefork

Reputable
Dec 7, 2014
11
0
4,510



Thanks billy.

I started wanting a Dual WAN, and having DD WRT I read that I had to do some changes via IPTABLES and many reported it didn't work so, not being used to IPTABLES I decided to try the Asus Original Firmware that now has the feature of Dual WAN with fail over. But it really doesn't work. With an old 2G USB dongle it sort of work, but often the router would momentarily freeze. A couple of newer 3G USB dongle didn't work.

So I opted out of that, surely a perfect configuration would work, except I'm far from understand enough to have one.

But now, having tested the 3G for a while (it doesn't fail much, except perhaps once every two days, and the problem seems to be with the Tomato Firmware, because a Reboot makes it work again), now I'd like to keep the 3G as the main connection and use the DSL for bigger downloads (Roku, Diskstation and torrents).

My problem is, I want to be able to see the Diskstation from the subnet that has the 3G internet, but I surely don't want the Diskstation to go to the internet thru the 3G. The same with the Roku.

I believe I could do this with the third router, with static IPs and in there, but having no experience in this, I don't know if at some point, when the DSL fails, the Diskstation might want to to the other subnet for the internet access.

I will try to make a chart of what I have tonight or tomorrow.

Thanks billy, If you please can comment more on how you were able to set up a dual wan (with fail over?) on a dd wrt? I love tomato because of all the options, but DD WRT is much more stable in my experience.
 

orangefork

Reputable
Dec 7, 2014
11
0
4,510
Ok, here's the diagram of what I have right now.

10849901_775355939202140_7628940072628964314_n.jpg



Router C could be used to connect both LANs, or if there's a solution without it it'd be better for me. The main restriction I have is that I need that devices in LAN 1 should never use LAN2's internet connection (3G modem). Not even if the DSL connection fails.

In LAN1 are all the devices that eat a lot of bandwidth and that doesn't have critical tasks that need Internet. If they were to access the 3G modem in LAN2, they would eat the 10GB in a day.



Any ideas how to connect them respecting this restriction?
 
You do need a router between the networks but it would be complex with a third router. Maybe you can use default asus firmware hard to say they keep adding stuff and I don't keep up with it. I know for sure dd-wrt and tomato can do this and it is simple.

What you want is a second network on router A. You plug a lan port on the dsl router into the asus and assign a ip like 192.168.1.200 to the asus. You would NAT the 192.168.2.x address to the this 192.168.1.200 This would allow traffic to go from lan 2 to lan 1 but not the reverse.

If you could use hard coded ip addresses and gateways you could just put both router in the same subnet and have one router on say 192.168.1.1 and the second on 192.168.1.2.

Having 2 connections is the pretty simple getting them to fail over is what is very tricky.
 

orangefork

Reputable
Dec 7, 2014
11
0
4,510



This is what I don't exactly undersdtand because I've never done it. I've played with networks before but always with only one subnet, and I have a theoretical knowledge from college but never really did much with it.

You are suggesting that I connect the routers directly but they both have DHCP service, so I don't know if there will be a conflict there. Or do I have to shut down the DHCP and give manual addresses to every device? Or keep the DHCP but assign IPs to some devices?

To some devices I have to give the IP, like the bank terminals, that are configured one way and it has to stay that way, because the settings are password protected.

Also It might look I don't want to try but the thing is I have to try after 11pm when the business closes. So I sort of want to understand you a bit more before starting so I don't spend the whole night changing it back if it doesn't work.

So, wired DSL router(linksys fm) to Router A (tomato shibby fm) on LAN ports both, and after doing that, both try to assign IPs to each end, but because both don't expect to get an IP, rather they are assigning one, what happens after? Do I have to manually assign it? How do I NAT the other subnet?

And, how would the devices on the DSL subnet not look for internet in the 3G subnet when the internet fails? If they are directly connected now, the gateway might send them there.. wouldn't it?

I guess I'm confused at the part of the IPs in each router end..

I tahnk you a lot, I would really appreciate if you would elaborate more.
 
Yes the key here is one of the 2 routers must disable the DHCP.

It does not matter a lot which device runs the DHCP. You will only have a single subnet but you will have multiple exit gateways addresses.

Which device to run DHCP sometime is tricky to decide. First if you have a device that only supports DHCP and you can not set a static IP or gateway then you must have the router that device needs provide the IP via DHCP. Get massively complex if you would have 2 devices that support DHCP only and you want one to use one router and one to use the other.

If this is not a issue then you next selection criteria is which network has more devices especially ones that come and go to other networks. Just for ease you want to run those on DHCP. The other network you must manually set the IP addresses and the gateway (to the other router) so the fewer you have like this the better.

If the DSL goes down the device using it pretty much do not know about the other connection either because you hard coded the gateway so they don't look or because they have no way to know what address you selected for the 3g router without you telling them
 
Solution