Community discussions

MikroTik App
 
gius64
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Tue Jan 14, 2014 3:43 pm

OSPF redundancy and load balancing with different capacity

Fri Aug 30, 2019 1:13 pm

Hi everyone,
I'm trying to setup a load balancing environment with redundancy.

I have this situation:

R1 -> Wireless Link -> R2 -> Wireless link -> R3
R1 -> Wireless Link -> R4 -> Wireless link -> R3

So I can reach R3 with two different paths.
I'm currently using OSPF with ECMP, so I've set on all routers "10" as cost for each interface.

It works correctly and traffic is per-connection balanced.
Both wireless link have the same capacity in normal conditions, but when rain comes up, link capacity can be reduced (they're microwave links).

I would like to do routing decisions based on how much bandwidth I have on each link.
How to know the available bandwidth it's not an issue. I can use an API for that so I can create a custom script in the router if needed.

Let's say the first link (R2 to R3) is 100Mbps and the second link (R4 to R3) is 400Mbps.
I would like to balance connections as 1/4 to R2->R3 and 3/4 to R4->R3.

In R3 I can balance upload traffic doing this:
/routing filters
add action=accept chain=ospf-in comment="ECMP - upload only" \
    disabled=yes prefix=0.0.0.0/0 set-in-nexthop=\
    R4,R4,R4,R2
And it works.

But how can I do it for download traffic?
I can't understand what I have to do in R1, because there are lots of prefixes announced through R3 and it's not possible to do it statically.

Any idea?

Maybe OSPF only is not enough for this purpose... Do you think something else can help?
For example: Simple TE?

Thank you!
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: OSPF redundancy and load balancing with different capacity

Sat Aug 31, 2019 3:25 am

We came up with a design to solve this problem for a client WISP and then published the solution which is here:

https://www.stubarea51.net/2016/10/27/w ... ual-links/

We took it a step further and paired it with BGP and presented the design at the MikroTik 2017 US MUM in Denver, CO

Image

https://www.youtube.com/watch?v=dFZz2z6RdQY

https://mum.mikrotik.com/presentations/ ... 062656.pdf
 
gius64
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Tue Jan 14, 2014 3:43 pm

Re: OSPF redundancy and load balancing with different capacity

Sat Aug 31, 2019 3:23 pm

Wow!
That's a brilliant solution, thank you very much for pointing me in this direction.

I'll try to do some traffic engineering in my case and try to expand it to the network diagram below.
net_diag.png
In my case there are multiple links, all microwave links, and with rain their capacity drops out.
I would like to do some balance at first to use all the capacity I have, and then, when it's raining, I would like to optimize paths in real time, maybe using some script as I said.

That's a great solution to start with, thank you very much.

If you should have any suggestion for me and my network I'm here to listen!
You do not have the required permissions to view the files attached to this post.
 
gius64
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Tue Jan 14, 2014 3:43 pm

Re: OSPF redundancy and load balancing with different capacity

Sat Aug 31, 2019 4:27 pm

IPANetEngineer, in your video it says there will be a live demo, but the video is cutted at the end without the live demo.
Is that demo available?
I would like to better understand this approach.
 
venthyl
newbie
Posts: 27
Joined: Thu Nov 03, 2011 3:12 pm

Re: OSPF redundancy and load balancing with different capacity

Sun Jan 26, 2020 10:04 am

We came up with a design to solve this problem for a client WISP and then published the solution which is here:

https://www.stubarea51.net/2016/10/27/w ... ual-links/

We took it a step further and paired it with BGP and presented the design at the MikroTik 2017 US MUM in Denver, CO

Image

https://www.youtube.com/watch?v=dFZz2z6RdQY

https://mum.mikrotik.com/presentations/ ... 062656.pdf

in larger network like my, (fiber,radio mixed)
is much better to use

nmba ptmp
one vlan on one path

on routers behind main router
use ip route filter on slave routers allow 0000/0 drop els,
on out filter list prefix to send and drop unwanted
add only one neigbor - main router

default will be 1:1
if you want 1:2
just add additional new ip class adress to vlan where is better link
add network in ospf
add neigbor in ospf

and autmaticaly ospf show new interface Dynamic on the same vlan, and ip route show new gateway


mikrotik is very creepy and don allow to change mac addres on vlan ,

so if you have many vlan on same master interface , specially between routers
you need add bridge,disable rstp, set admin mac adrres uniqe, and add vlan to bridge, and set interface ospf to bridge

in other way in most common cases , will be work only one vlan
(the same mac addres even in different vlan tag)
 
gius64
Member Candidate
Member Candidate
Topic Author
Posts: 213
Joined: Tue Jan 14, 2014 3:43 pm

Re: OSPF redundancy and load balancing with different capacity

Sun Jan 26, 2020 10:45 am

Could you please post an example of your configuration?
 
mohamed002
just joined
Posts: 1
Joined: Fri Mar 16, 2018 12:21 pm

Re: OSPF redundancy and load balancing with different capacity

Fri Jul 24, 2020 4:03 pm

We came up with a design to solve this problem for a client WISP and then published the solution which is here:

https://www.stubarea51.net/2016/10/27/w ... ual-links/

We took it a step further and paired it with BGP and presented the design at the MikroTik 2017 US MUM in Denver, CO

Image

https://www.youtube.com/watch?v=dFZz2z6RdQY

https://mum.mikrotik.com/presentations/ ... 062656.pdf
please post an example of a configuration

Who is online

Users browsing this forum: No registered users and 24 guests