Community discussions

 
netbits
just joined
Topic Author
Posts: 24
Joined: Fri Aug 03, 2012 11:25 pm

3 WAN Setup. 2 to load Balance, 3 for failover

Wed Nov 13, 2013 5:02 pm

We have 2 ADSL connection and 1 Fibre connection.

I would like to know if it is possible to load balance the two ADSL connections and only when the 2 ADSL lines are down, that all traffic goes through the Fibre until at lease one of ADSL lines come back?

Can i do this on one router, or should I use two routers for the separate tasks?
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: 3 WAN Setup. 2 to load Balance, 3 for failover

Thu Nov 14, 2013 7:18 pm

Hi. You can do this in the same mikrotik harware. For the load balancing you can do by pcc and the fiber connection with distance like 3 and you have for backup this.


Send from my mobile phone using Tapatalk.
nothing
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: 3 WAN Setup. 2 to load Balance, 3 for failover

Thu Nov 14, 2013 7:43 pm

Here is a great place to start for PCC and other load balancing questions:
http://wiki.mikrotik.com/wiki/Load_Balancing
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
AaronG
just joined
Posts: 3
Joined: Fri Nov 15, 2013 1:16 am

Re: 3 WAN Setup. 2 to load Balance, 3 for failover

Fri Nov 15, 2013 1:56 am

Without a dynamic routing protocol between your ISP and you (like BGP), you are probably stuck with masquerading your LAN IPs.
Let's assume you have three point to point public IPs to your ISPs and your LAN is 192.168.0.0/24.

WAN1 (10.10.10.0/30 IP)<---->DSL1
WAN2 (10.10.9.0/30 IP)<---->DSL2
WAN3 (10.10.8.0/30 IP)<---->Fiber
LAN <---192.168.0.0/24---> Hosts

you would then have three masquerade rules:
chain=srcnat action=masquerade src-address=192.168.0.0/24 out-interface=WAN1
chain=srcnat action=masquerade src-address=192.168.0.0/24 out-interface=WAN2
chain=srcnat action=masquerade src-address=192.168.0.0/24 out-interface=WAN3

Then you would have your default routes contingent on a connection being up. There are many ways to do this, but the easiest is check-gateway ping. The lowest distance will be preferred. Even if you do PCC, you will want floating backup routes.

dst-address=0.0.0.0/0 gateway=10.10.10.1 check-gateway=ping distance=5 scope=30 target-scope=1
dst-address=0.0.0.0/0 gateway=10.10.9.1 check-gateway=ping distance=5 scope=30 target-scope=1
dst-address=0.0.0.0/0 gateway=10.10.8.1 check-gateway=ping distance=7 scope=30 target-scope=1

This alone would allow you to use any of the three connections with the same private host IP. Don't forget to use DNS that will work on any of the three WAN connections!

This is an insanely good explanation of PCC hashing:

http://mum.mikrotik.com/presentations/US12/steve.pdf

Who is online

Users browsing this forum: No registered users and 32 guests