Community discussions

MikroTik App
 
thersh
just joined
Topic Author
Posts: 5
Joined: Wed Oct 06, 2010 7:39 pm

Load balancing with failover AND bonding

Thu Oct 07, 2010 12:41 am

I'm new to the forum and new to bonding and routing protocols. Thanks in advance for the help.

I'm trying to create a redundant backhaul link for my wireless backbone. I completely control both ends. My goal is great availability when one of the wireless (5ghz) links goes completely down, OR if one is simply poor. I don't need the RouterBoards to do the wireless as I plan to use dedicated APs and CPEs (Ubiquiti) on both ends.

I have been using two RB/433AH on each end; ether2-ether2 is connected with one link, ether3-ether3 with another. Ether1 on one end goes to my DIA and the ether1 on the other end will connect to my customers on a separate subnet.

OSPF works fine if one link goes completely down, but when one is limited to 1Mbps (limited by Ubiquiti traffic shaping to simulate a poor quality link), OSPF chooses that link for half of the duplex. Here is the OSPF config:
  • For router 1 (inside router)

    /system identity set name=rtr1

    ***Configure IP addresses on 3 interfaces

    /ip address add address=192.168.20.1/24 interface=ether1
    /ip address add address=192.168.21.1/24 interface=ether2
    /ip address add address=192.168.22.1/24 interface=ether3

    ***Configure OSPF networks for all 3 interfaces

    /routing ospf network add network=192.168.20.0/24 area=backbone
    /routing ospf network add network=192.168.21.0/24 area=backbone
    /routing ospf network add network=192.168.22.0/24 area=backbone

    /routing ospf instance set 0 router-id=0.0.0.1


    For router 2 (internet side router)

    /system identity set name=rtr2

    ***Configure IP addresses on 3 interfaces

    /ip address add address=192.168.23.1/24 interface=ether1
    /ip address add address=192.168.21.2/24 interface=ether2
    /ip address add address=192.168.22.2/24 interface=ether3

    ***Configure OSPF networks for all 3 interfaces

    /routing ospf network add network=192.168.23.0/24 area=backbone
    /routing ospf network add network=192.168.21.0/24 area=backbone
    /routing ospf network add network=192.168.22.0/24 area=backbone

    ***Configure default route

    /ip route add dst-address=0.0.0.0/0 gateway=192.168.23.2

    ***Allow OSPF to distribute the default route

    /routing ospf instance set 0 distribute-default=always-as-type-1
Simply bonding the interfaces on both ends is limited at the poor link speed. I have read that eOIP is the same.

I am open to any suggestions, including, using RB450Gs (switch mode?), other vendor layer 2 link aggregation, or 5GHz cards in the RB/433AHs.

Thanks again,
Thersh
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover AND bonding

Sat Oct 09, 2010 2:14 pm

Simply bonding the interfaces on both ends is limited at the poor link speed. I have read that eOIP is the same.
what kind of traffic do you have? bonding-xor should work fine (not -rr!)
 
thersh
just joined
Topic Author
Posts: 5
Joined: Wed Oct 06, 2010 7:39 pm

Re: Load balancing with failover AND bonding

Mon Oct 18, 2010 5:36 pm

Thanks! That worked great!

Since I don't have to use a routing protocol now, I just have to figure out how to config these guys as switches. I suppose my new 450Gs will do it nicely.
 
thersh
just joined
Topic Author
Posts: 5
Joined: Wed Oct 06, 2010 7:39 pm

Re: Load balancing with failover AND bonding

Sat Oct 23, 2010 1:32 am

Ok, I spoke too soon.

I'm using two 450Gs now, balance-xor, link-monitoring-arp, and I'm bridging the bonding interface with ether1 on both routers (not actually routing).

It works great when one link goes down completely, whether it's a cable disconnect or a totally down wireless link. But, when the wireless link is merely slow, but with no packet loss (PL is tough to simulate), it seems to use the slow link (interface?) for either transmit or receive. I configured 1024 kbps traffic shaping on one of the 5ghz links to simulate a "poor" link. Both RouterOS bandwidth tests and my own web-based speed test show the upload at 1 Mbps. When I swap cables, the download (rcv) goes to 1 Mbps. When I completely disconnect the slow link, the bonding uses the up interface as full duplex and I get great speeds up and down (xmt and rcv).

I've tried so many bonding and bridging settings with no success. Early on I changed [ /interface bonding set 0 lacp-rate=1sec] on both 450Gs and it worked great for a while. At some point it stopped working. I don't think it was something I changed, but maybe I did.

Please help.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover AND bonding

Sat Oct 23, 2010 3:20 am

so you want the router get to know that some link is "slow"? it's impossible - there's no even packet drop, according to your words

in '-xor' mode, the link is selected for each 'stream' (based on bonding settings), it do not change during transmit

it's like in situation with download QoS on the router - your router can't know whether it's ISP's non-guaranteed link's congestion or your users just don't use Internet =)
 
thersh
just joined
Topic Author
Posts: 5
Joined: Wed Oct 06, 2010 7:39 pm

Re: Load balancing with failover AND bonding

Sun Oct 24, 2010 8:15 pm

Ok, thanks. That makes sense. Wow, that was a bunch of wasted time. :? Oh, well. It's a rare failure mode I was trying to get the router to automatically react to, anyway. I think I'll just write a script that will email me bandwidth tests.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover AND bonding

Sun Oct 24, 2010 8:30 pm

yep. and not to waste bandwidth during the test, you may first monitor the link, and if RX is lower than some value - then do BW-test
 
thersh
just joined
Topic Author
Posts: 5
Joined: Wed Oct 06, 2010 7:39 pm

Re: Load balancing with failover AND bonding

Sun Oct 24, 2010 8:45 pm

If the script can read monitoring values, could I get the script to disable the correct interface? If not, could it just disable one interface, monitor again, if values are poor, then enable and disable the other interface? Then, I could fix the link and manually re-enable the interface.
 
josekies
just joined
Posts: 13
Joined: Sun Mar 01, 2009 1:07 am

Re: Load balancing with failover AND bonding

Sun Jul 21, 2013 1:33 am

did you find the sollution to that??
I am trying the same with the same problem.
Thanks!
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover AND bonding

Sun Jul 21, 2013 2:45 am

josekies, please read the topic thoroughly
 
josekies
just joined
Posts: 13
Joined: Sun Mar 01, 2009 1:07 am

Re: Load balancing with failover AND bonding

Sun Jul 21, 2013 4:05 pm

thanks Chupaka for your answer.

I have read it, :D , just wonder if he found a way to make intelligent the bonding system.

or if there is a new method to make it, I now that post is old, but I need to make a full duplex using ubiquiti system and rb550 , that give me more throughtput and failover.
I just have bonding and works well, but the problem is , when one of the ubiquiti links goes down in throughput, all goes down
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Load balancing with failover AND bonding

Mon Jul 22, 2013 4:37 pm

I meant that post: http://forum.mikrotik.com/viewtopic.php ... 32#p232732 - it contains the answer to your first question :)

if your bonding slaves have almost equal traffic all the time, you can monitor it, and if it differs, then disable link with low throughput. you will need to enable it manually later
 
Abdock
Member Candidate
Member Candidate
Posts: 261
Joined: Sun Sep 25, 2005 10:50 pm

Re: Load balancing with failover AND bonding

Tue Jul 23, 2013 8:27 pm

Chupaka, Sorry to highjack this thread, but can you please look at this one, for balanced xor, http://forum.mikrotik.com/viewtopic.php?f=2&t=74984

thanks,

Who is online

Users browsing this forum: aboiles, Bing [Bot], neitro and 106 guests