Community discussions

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

Load Balance with Fail Over

Mon Sep 17, 2007 7:21 am

Hi all,
I have done configuration of load balancing with Failover.

Load Balancing is working Perfect but fail over is NOt working. The configuration is.

/ip route

[admin@MikroTik] ip route> print detail
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
0 ADC dst-address=10.10.1.0/30 pref-src=10.10.1.2 interface=ether1 scope=10
target-scope=0

1 ADC dst-address=10.10.2.0/30 pref-src=10.10.2.2 interface=ether2 scope=10
target-scope=0

2 ADC dst-address=192.168.1.0/30 pref-src=192.168.1.1 interface=ether3
scope=10 target-scope=0

3 A S dst-address=0.0.0.0/0 gateway=10.10.1.1 check-gateway=ping
interface=ether1 gateway-state=reachable scope=255 target-scope=10
routing-mark=odd

4 A S dst-address=0.0.0.0/0 gateway=10.10.2.1 check-gateway=ping
interface=ether2 gateway-state=reachable scope=255 target-scope=10
routing-mark=even

5 A S dst-address=0.0.0.0/0 gateway=10.10.2.1 interface=ether2
gateway-state=reachable scope=255 target-scope=10

6 S dst-address=0.0.0.0/0 gateway=10.10.1.1 interface=ether1
gateway-state=reachable distance=2 scope=255 target-scope=10


[admin@MikroTik] ip route>

If i disconnect either line, it WONt work , What to do.

Thanks

ASHISH
 
valens
Trainer
Trainer
Posts: 246
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Re: Load Balance with Fail Over

Mon Sep 17, 2007 9:51 am

sometimes, problem happen not in the next gateway, but somewhere in internet.
check gateway feature in static route, check only the connection to the gateway.
if you want to set a fail over system and check your line further,
you have to use netwatch and do scripts if gateway problem happen.
 
User avatar
ashish
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Mon Feb 12, 2007 5:50 am
Location: Virginia, USA.

Re: Load Balance with Fail Over

Mon Sep 17, 2007 11:18 am

Do you Think it will WORK..

ASHISH
 
valens
Trainer
Trainer
Posts: 246
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Re: Load Balance with Fail Over

Mon Sep 17, 2007 12:01 pm

sure, why not?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Load Balance with Fail Over

Mon Sep 17, 2007 5:11 pm

and how you mangle packets (mark with routing mark)?
so, what you have in mangle
 
User avatar
ashish
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Mon Feb 12, 2007 5:50 am
Location: Virginia, USA.

Re: Load Balance with Fail Over

Tue Sep 18, 2007 5:57 am

Yes, Routing Mark.

I have done with the wiki example.

Load Balance is working fine, But the failover is NOT working Properly, Sometimes it works and its taking time to cange over, Any other idea
 
ravin
Member Candidate
Member Candidate
Posts: 173
Joined: Mon Jan 29, 2007 3:59 pm
Location: mym

Re: Load Balance with Fail Over

Wed Sep 19, 2007 10:28 am

Hi,

I have also implemented load balancing in my setup. I have one question. If I have 2 wan links of 256kbps & 1 Mbps, how load balancing will happen ?

B'coz as per wiki every alternate packet will be passed through the wan links and in my setup one wan link is 256 & other one is 1 Mbps. What will happen
if the 256 kbps gets overloaded. Will the packets belong to 256 link get diverted to 1 mbps link once the 256 link is full ?

Thanks in advance.

Ravin
 
User avatar
ashish
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Mon Feb 12, 2007 5:50 am
Location: Virginia, USA.

Re: Load Balance with Fail Over

Wed Sep 19, 2007 2:40 pm

If your line 1 with 256 Kbps gets full, it will divert all the traffic to the second line with 1 Mbps.

You can check Practically...Its working
 
pokeman
Member Candidate
Member Candidate
Posts: 136
Joined: Fri Jun 05, 2009 10:52 pm

Re: Load Balance with Fail Over

Fri Sep 21, 2007 10:27 am

hello
paste me only Fail over scripts i have 2 adsl for different isp
 
User avatar
ashish
Long time Member
Long time Member
Topic Author
Posts: 550
Joined: Mon Feb 12, 2007 5:50 am
Location: Virginia, USA.

Re: Load Balance with Fail Over

Fri Sep 21, 2007 4:28 pm

 
ravin
Member Candidate
Member Candidate
Posts: 173
Joined: Mon Jan 29, 2007 3:59 pm
Location: mym

Re: Load Balance with Fail Over

Fri Oct 19, 2007 2:50 pm

Hi,

Have installed load balancing & fail-over system in Mikrotik. Now I want to make sure that load balancing works perfectly.
How can I check whether it's functioning properly. Is there any method by which I can check.

Fail-over works fine when I disable the working route, the packets are routed to the 2nd route. But if I remove the network
cable from working route, change over doesn't happen.

Thanks
Ravin
 
ravin
Member Candidate
Member Candidate
Posts: 173
Joined: Mon Jan 29, 2007 3:59 pm
Location: mym

Re: Load Balance with Fail Over

Thu Jan 17, 2008 9:03 am

Hi

I have been using fail-over and load balancing features in mikrotik. Recently I observed a problem in mikrotik. I have two bandwidths coming
from 2 ISP (ISP-a-1 Mbps + ISP-b-2 Mbps). Now the problem is that using load balancing features I'm using only 1 mbps from 2 mbps line (ISP-b). I checked my
usage with MRTG and it shows only 1 Mbps is being used out of 2 mbps link. How can I overcome this problem. I have been paying for 2 mbps and using only
1 mbps from ISP-b and 1 mbps from ISP-a. Load balancing is done by sending alternate packets to both the links. My one link is only 1 mbps and I think
that's the reason mikrotik is using only 1 mbps from another 2 mbps link.

Awaiting your reply.

Thanks & Regards,
Ravin
 
EgyCom
Member Candidate
Member Candidate
Posts: 123
Joined: Thu May 31, 2007 9:47 pm

Re: Load Balance with Fail Over

Fri Jan 18, 2008 11:45 pm

Hi

I have been using fail-over and load balancing features in mikrotik. Recently I observed a problem in mikrotik. I have two bandwidths coming
from 2 ISP (ISP-a-1 Mbps + ISP-b-2 Mbps). Now the problem is that using load balancing features I'm using only 1 mbps from 2 mbps line (ISP-b). I checked my
usage with MRTG and it shows only 1 Mbps is being used out of 2 mbps link. How can I overcome this problem. I have been paying for 2 mbps and using only
1 mbps from ISP-b and 1 mbps from ISP-a. Load balancing is done by sending alternate packets to both the links. My one link is only 1 mbps and I think
that's the reason mikrotik is using only 1 mbps from another 2 mbps link.

Awaiting your reply.

Thanks & Regards,
Ravin

in mangle you need to change NTH to divide traffic on three (nth=2,1,0) , and add two new mangle
/ ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=2,1,0 \
    action=mark-connection new-connection-mark=2M-1ST passthrough=yes comment="" \
    disabled=no
	
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
    new-routing-mark=2M-1ST passthrough=no comment="" disabled=no 
	
add chain=prerouting in-interface=Local connection-state=new nth=2,1,1 \
    action=mark-connection new-connection-mark=2M-2ND passthrough=yes comment="" \
    disabled=no 
	
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
    new-routing-mark=2M-2ND passthrough=no comment="" disabled=no
	
add chain=prerouting in-interface=Local connection-state=new nth=2,1,2 \
    action=mark-connection new-connection-mark=1M passthrough=yes comment="" \
    disabled=no 
	
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
    new-routing-mark=1M passthrough=no comment="" disabled=no 	
last add new default route for new routing mark to use 2M line
/ ip route 
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=1M check-gateway=ping 

add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=2M-1ST check-gateway=ping 

add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=2M-2ND check-gateway=ping 

add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10

add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 distance=2
=== sorry for my bad english
 
ravin
Member Candidate
Member Candidate
Posts: 173
Joined: Mon Jan 29, 2007 3:59 pm
Location: mym

Re: Load Balance with Fail Over

Mon Jan 21, 2008 8:45 am

Thank you for your reply.

Surely, I'll implement this solution. But can you please explain me the parameters in nth. What this values stand for?

Regards,
Ravin
 
User avatar
sandov63
newbie
Posts: 34
Joined: Mon Jun 25, 2007 9:15 pm
Location: Villa del rosario perija zulia, venezuela

Re: Load Balance with Fail Over

Wed Feb 20, 2008 11:58 pm

A question for you,, how to do load balance with failover with 2 adsl modems if it asign to me dynamyc ip addresing?

how i put it
(1 ADC dst-address=10.10.2.0/30 pref-src=10.10.2.2 interface=ether2 scope=10
target-scope=0)

OR

( A S dst-address=0.0.0.0/0 gateway=10.10.1.1 check-gateway=ping
interface=ether1 gateway-state=reachable scope=255 target-scope=10
routing-mark=odd)


on my MIKROTIK if my ip on eth1 and eth2 will change?

do you have an example? please
Cuando la ignorancia se impone, la razon cordialmente cede el paso.
 
User avatar
Maruf
just joined
Posts: 1
Joined: Fri Feb 11, 2011 9:11 pm
Location: Dhaka, Bangladesh
Contact:

Re: Load Balance with Fail Over

Fri Feb 11, 2011 9:37 pm

Hi all,
I have done configuration of load balancing with Failover.

Load Balancing is working Perfect but fail over is NOt working. The configuration is.

/ip route

[admin@MikroTik] ip route> print detail
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
0 ADC dst-address=10.10.1.0/30 pref-src=10.10.1.2 interface=ether1 scope=10
target-scope=0

1 ADC dst-address=10.10.2.0/30 pref-src=10.10.2.2 interface=ether2 scope=10
target-scope=0

2 ADC dst-address=192.168.1.0/30 pref-src=192.168.1.1 interface=ether3
scope=10 target-scope=0

3 A S dst-address=0.0.0.0/0 gateway=10.10.1.1 check-gateway=ping
interface=ether1 gateway-state=reachable scope=255 target-scope=10
routing-mark=odd

4 A S dst-address=0.0.0.0/0 gateway=10.10.2.1 check-gateway=ping
interface=ether2 gateway-state=reachable scope=255 target-scope=10
routing-mark=even

5 A S dst-address=0.0.0.0/0 gateway=10.10.2.1 interface=ether2
gateway-state=reachable scope=255 target-scope=10

6 S dst-address=0.0.0.0/0 gateway=10.10.1.1 interface=ether1
gateway-state=reachable distance=2 scope=255 target-scope=10


[admin@MikroTik] ip route>

If i disconnect either line, it WONt work , What to do.

Thanks

ASHISH
Dear ashish
I also faced the same problem and couldn't get rid off, even with ECMP, the out put remain same.
Did get any way to make it working ?? please give me the solution.
Now i implement only NTH for just load balance over there, last few days it was working smoothly, but now after down one link another not working. What should have to do, any suggestion ??
Waiting for ur early reply.

Thanks
Maruf
anjamul.bashed@aamra.com.bd
Mirza Anjamul Maruf
Network Engineer, aamra NETWORKS
mail:anjamul.bashed@aamra.com.bd
gmail:me1403@gmail.com

Who is online

Users browsing this forum: belits17 and 128 guests