How can I use two Internet connections at the same time?

4

I have two Internet connections to my home and I want to use them simultaneously. Both of them are the same speed — something like 10Mbit/1Mbit. How can I achieve this?

I'm thinking of using the MikroTik RB750 router. I've seen some basic stuff done with MikroTik wi-fi routers — and I understand IP on a theoretical level — but I don't know if this device is capable of what I need.

EDIT:
How should the configuration look? Let's say one ISP router provides me with 192.168.1.0/24 DHCP adresses and 192.168.1.1 GW; the other, 192.168.2.0/24 DHCP adresses and 192.168.2.1 GW.

My LAN should be 192.168.3.0/24 DHCP.

Hurda

Posted 2011-08-31T07:14:58.837

Reputation: 195

possible duplicate of Taking advantage of two broadband links

– Linker3000 – 2011-09-01T18:39:27.743

@Linker, this differs in that he isn't asking about MLPPP (as far as I know, he was not specific about ISPs and connection types) but he was specific about the router and config he wanted, which is close to the one that the above link links to, but I think it should remain open as this is specific to RouterOS. – MaQleod – 2011-09-02T01:02:02.480

Answers

1

The Mikrotik RB750 is more than capable of doing what you want with it (after reading the manual for it). There is one caveat that RouterOS doesn't have out of the box support for some sort of dynamic failover between the two connections unless your ISPs will use a routing protocol. You'll have to setup a script on the RouterOS box that pings over both interfaces (static route google.com over one and yahoo.com over the other, or just ping the ISP gateway) and shuts one down if it fails. Thanks for introducing me to RouterOS and these cool Mikrotik boards! If you have other questions about the config please update the post.

polynomial

Posted 2011-08-31T07:14:58.837

Reputation: 1 424

3

If you want to use multiple WANs on the same network, you need multiple WAN ports on the router that will control that network. This will not be done cheaply as it will require a business grade router. You can however configure a computer as a router and use multiple NICs, but the setup/configuration is not for the faint of heart. The typical configuration that most companies want when they set this up is to have a balanced load (connections out of the network get routed to a given circuit based on the overall load on each circuit). This does not mean you will get shared bandwidth between the two circuits, they are still two separate circuits and each connection out will use one or the other, not both. The other common configuration is a fail-over, where one is primary and is always used until it goes down, then the router hands all traffic over to the secondary until the primary is brought back up.

RouterOS config samples:

To specify IPs on an interface:

ip address
add address=192.168.3.0/24 network=192.168.0.0 broadcast=192.168.3.255 interface=Local
add address=192.168.1.0/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.0/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2

To Add DHCP for your LAN:

/ip dhcp-client add interface=Local disabled=no

/ip pool add name="default-dhcp" ranges=192.168.3.50-192.168.3.150;
/ip dhcp-server 
  add name=default address-pool="default-dhcp" interface=bridge-local disabled=no;

/ip dhcp-server network 
  add address=192.168.3.0/24 gateway=192.168.3.1 dns-server=192.168.3.1 comment="default configuration";

Load Balancing:

/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2

add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Local

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=src-address:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping

/ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade

MaQleod

Posted 2011-08-31T07:14:58.837

Reputation: 12 560

This was not helpful at all - all know all this theoretic stuff - I need to find solution how to do it – Hurda – 2011-08-31T09:01:30.767

Theoretical? This is an explanation of technical limits and definition of options. How is this any less helpful than pointing out software or hardware without sample configurations? Did you ask for specific configurations for anything? How are we supposed to provide you an exact solution if your question is so broad that you can't even tell us what you want? I see your edit now, but do you want load balanced? do you want fail-over? do you want QoS for anything? – MaQleod – 2011-08-31T13:32:52.530

The microtic was mentioned there from the begining. There is no hint of QoS so you can leave that out. Fail over is'n "use them simoultanously". So I thing this points to load balancing. I described my position axactly as it is - I think many a man have been in this situation so someone might know exact solution to this problem. – Hurda – 2011-09-01T14:21:38.467

I still don't see how this was singled out as less helpful than other answers received, but ok. RouterOS is capable of multiple WANs, you just need to specify each interface individually as WAN with it's IP details. Load balancing is a bit more complicated as there are many ways to go about depending on your setup, which you didn't really provide any details about. You also didn't say what type of connections you had or even if they were the same ISP or not, which can make a difference in what "simultaneous" actually means. I'll see what I can find for a config with this tid bit of info. – MaQleod – 2011-09-01T14:58:40.787

Updated with IP address assignment for interfaces, DHCP setup for the LAN and load balancing two WANs. – MaQleod – 2011-09-01T17:59:13.817

1

Shorewall (a Linux/iptables based firewall) supports using multiple ISP connections and load balancing between then, you might want to check that out. Shorewall is relatively easily configurable compared to creating bare iptables rules.

Jaap Eldering

Posted 2011-08-31T07:14:58.837

Reputation: 7 596