Community discussions

MikroTik App
 
wispnewbie
just joined
Topic Author
Posts: 14
Joined: Fri Aug 11, 2006 5:31 pm

Load balancing with failover

Fri Aug 10, 2007 5:32 pm

http://wiki.mikrotik.com/wiki/Load_Balancing
http://wiki.mikrotik.com/wiki/Load_Balancing_Persistent

I believe that I understand the way that these work, however I don't see any possibility for these rules to provide failover.

My setup: I have two ISP accounts with two static IPs (different networks); both accounts are connected to MT router. I would like to provide load balancing and failover capabilities in case one ISP fails.

Also what is the effect on apps like messenger, etc. I have read that they do not like load balancing.

Thank you.
 
alex_rhys-hurn
Member
Member
Posts: 353
Joined: Mon Jun 05, 2006 8:26 pm
Location: Kenya
Contact:

Re: Load balancing with failover

Sat Aug 11, 2007 11:21 am

I am also working on this.

I have used both of these scenarios, and I find that the first one load balances better than the second.

The plan that I am working through, is to use the netwatch tool to keep an eye on my gateways and when a gateway fails to run a certain script.

That script will then disable the load balancing routes and leave only one default route in place.

Trouble is im not too hot on scripts and its taking a while (any one got a script they want to share?) My other problem is that on one of my links which is a VSAT the gateway address is the satellite modem, and so that is on ethernet cable in the same room as router and rarely fails. My ISP is not being very helpful to find the next hop that I can use reliably for this netwatch tool.

Hope that gives you a direction to move in.

Alex
 
diaan1
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Tue Jun 12, 2007 7:31 pm

Re: Load balancing with failover

Sat Aug 11, 2007 12:46 pm

Hi,

I had the same kinda problem, but without balancing.

How I overcame your VSat gateway problem: Netwatch any site (google) and force the ICMP traffic to go through the VSat (using a rule). That way you do not need the second hop from your unhelpful friends. Just make sure that the google ping ONLY goes through the VSat.

From the wiki, I adapted the "improved netwatch 2" script for the failover.

Hope this helps.
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Load balancing with failover

Sat Aug 11, 2007 3:52 pm

Hi,

am working on same kind of problem. Have two ADSL ISP's. On this momemt only working to get the failover to work properly. In a later stage want to do the loadbalancing with failover backup as well.

The problem in this script: http://wiki.mikrotik.com/wiki/Improved_Netwatch_II is that whatever node I use to ping to (dns, ISP gateway, google, any other address) these nodes are never 100% up over time. When the ping doesn't return the default route is beeing re-written and all traffic flows to my backup ADSL.
In itself not such a problem but my network is beeing used mainly for live communication like Skype, MSN, and streaming video. Everytime the route changes these streams are broken and needed to start up.
Sometimes it is only because the pinged nodes hickup for a while but in the mean time the ADSL in itself is not down.... But the script rewrites the default gateway to go to the other interface to switch it back only after the next ping cicle.

My idea was to have the script pinging two or three nodes to decide if a route (and thus probably that whole connection) is down before the script starts changing the route costs.

but scripting is not my thing, I tried but don´t actually understand the give scripts I use. Anybody with any suggestions?

Rudy
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Load balancing with failover

Sat Aug 11, 2007 3:55 pm

My other problem is that on one of my links which is a VSAT the gateway address is the satellite modem, and so that is on ethernet cable in the same room as router and rarely fails. My ISP is not being very helpful to find the next hop that I can use reliably for this netwatch tool.

Hope that gives you a direction to move in.

Alex
Hi Alex,

Run a tracert to any internet node through the satellite. The result will show you several addresses to use for a ping past your Satlink.

Rudy
 
wispnewbie
just joined
Topic Author
Posts: 14
Joined: Fri Aug 11, 2006 5:31 pm

Re: Load balancing with failover

Mon Aug 13, 2007 7:02 pm

I'll go through all these suggestions and see if I can't come up with something that works. If anyone can provide a working failover script I (and apparently at least a few others) would really appreciate it.
 
alex_rhys-hurn
Member
Member
Posts: 353
Joined: Mon Jun 05, 2006 8:26 pm
Location: Kenya
Contact:

Re: Load balancing with failover

Tue Aug 14, 2007 8:39 am

Hey folks,

Thanks for all the constructive comments!

I am working through the process, but like wirelessrudy scripting is not my thing either!

Can anybody post and example script or explain to me what the best way is to disable the extra NAT rules that are put in place for the Load Balancing system?

I have resolved the VSAT hot to ping, thanks to you guys, Used the tracert method and was able to confirm the vsat hub IP address. I thought this would be a better way than choosing a host like google.

Regards,

Alex
 
menfung
just joined
Posts: 10
Joined: Tue Jun 05, 2007 10:28 pm

Re: Load balancing with failover

Wed Aug 15, 2007 7:59 am

Hey folks,

Thanks for all the constructive comments!

I am working through the process, but like wirelessrudy scripting is not my thing either!

Can anybody post and example script or explain to me what the best way is to disable the extra NAT rules that are put in place for the Load Balancing system?

I have resolved the VSAT hot to ping, thanks to you guys, Used the tracert method and was able to confirm the vsat hub IP address. I thought this would be a better way than choosing a host like google.

Regards,

Alex
If you still have no solution for this, you may use a hardware named "Multiple Homing Auto Balancer". This hardware combines multiple gateways become one port to your Router, and it can balance all bandwidth from those gateways.

I never try this hardware yet, but a friend told me this hardware helps a lot. I am gonna buy one.


Rgds,

Men Fung
 
kelmcw
just joined
Posts: 2
Joined: Tue Dec 13, 2005 10:28 am

Re: Load balancing with failover

Tue Sep 04, 2007 8:16 pm

Hi, a good recommendation is to get an external load balancer. I would recommend TP-Link TL-R488T. It works great for my hotspot setup with 4WAN & 1 LAN.
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Load balancing with failover

Wed Sep 05, 2007 12:36 am

Hi Guys,

You can buy dedicated LoadBalancers. They work fine (not always) but that's to be expected, they are made for that task. I've used one myself.

But MT routers can handle the same stuff, it only needs some configuration. Browse this Forum and learn. This way you save yourself money and achieve some extra knowledge.....

The advantage of using as much as possible MT stuff in your network is that you have plenty of different tools to monitor and work on it and it works everywhere the same. No need to find out how that $%& LB is working to see you can't have real time traffice or real time loadbalancing going through. MT can do all!
 
tully
MikroTik Support
MikroTik Support
Posts: 502
Joined: Fri May 28, 2004 11:07 am

Re: Load balancing with failover

Wed Sep 05, 2007 9:15 am

Typically the satellite bonding boxes have TCP acceleration (TCP ack frame spoofing so that the sender will not wait for the real high latency ack frame to arrive before sending another TCP window). RouterOS does not have that, but we will look into that and see how hard it is to make.

John
 
diaan1
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Tue Jun 12, 2007 7:31 pm

Re: Load balancing with failover

Wed Sep 26, 2007 1:01 am

How is this project coming along? (Tully)
 
tully
MikroTik Support
MikroTik Support
Posts: 502
Joined: Fri May 28, 2004 11:07 am

Re: Load balancing with failover

Wed Sep 26, 2007 10:18 am

Nothing started, but maybe something in Q1.

John
 
User avatar
ashish
Long time Member
Long time Member
Posts: 546
Joined: Mon Feb 12, 2007 5:50 am
Location: Virginia, USA.

Re: Load balancing with failover

Wed Sep 26, 2007 1:11 pm

HI,
We have Radware Linkproof, It works excellent with 3 Gateway.

ASHISH
 
enjoy
Frequent Visitor
Frequent Visitor
Posts: 67
Joined: Fri Jul 18, 2008 8:29 pm

Re: Load balancing with failover

Mon Nov 16, 2009 1:58 pm

but tell me...
can i have persistent connections with an hardware load balancer connected to the mikrotik ???
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover

Mon Nov 16, 2009 4:41 pm

it depends on the device which is actually doing load-balancung (i.e. hardware load balancer)
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: Load balancing with failover

Tue Nov 17, 2009 11:10 am

I have a Peplink-7 load balancer that can handle up to 7 WAN connections.
Up to now I use 6 of the connections.

Behind it I have a 80/20% Mikrotik/Ubiquity network.

I do have some issues with browsing at times and am not sure is this related to the Peplink or to the connected lines.

Any on this forum having experience with Peplink?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover

Tue Nov 17, 2009 11:18 am

what's your ROS config? if it has only one uplink - then it's surely Peplink problem

Who is online

Users browsing this forum: No registered users and 87 guests