Load balancing with failover AND bonding

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

what kind of traffic do you have? bonding-xor should work fine (not -rr!)

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.

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.

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 =)

Ok, thanks. That makes sense. Wow, that was a bunch of wasted time. :confused: 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.

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

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.

did you find the sollution to that??
I am trying the same with the same problem.
Thanks!

josekies, please read the topic thoroughly

thanks Chupaka for your answer.

I have read it, :smiley: , 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

I meant that post: http://forum.mikrotik.com/t/load-balancing-with-failover-and-bonding/41330/5 - it contains the answer to your first question :slight_smile:

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

Chupaka, Sorry to highjack this thread, but can you please look at this one, for balanced xor, http://forum.mikrotik.com/t/bonding-or-aggregate-links/68080/1

thanks,