Community discussions

MikroTik App
 
Benik3
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Apr 04, 2013 11:41 am

Backup connection with parallel antenna [solved]

Sat May 16, 2015 8:45 pm

Hello.

I have two Mikrotiks connected together with two antennas through LAN (24GHz main and 5GHz as backup).
Now I would like to make some system of the backup. The only idea which I got was to write script like this:

Ping remote router through LAN1 port (with 24GHz antenna). LAN2 port (with 5GHz antenna) is disabled.
If fail, change default gateway and enable LAN2 port.
Ping router through the LAN1 port, if the connection will start work again, change GW and disable LAN2 back.

It's a good idea or you have any better?
I didn't want to leave both antenna enabled, because I'm afraid of circulation of packets. Or not?

Thank you :)
Last edited by Benik3 on Wed May 20, 2015 12:12 am, edited 1 time in total.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Backup connection with parallel antenna

Sat May 16, 2015 11:15 pm

Hello.
I have two Mikrotiks connected together with two antennas through LAN (24GHz main and 5GHz as backup).
Now I would like to make some system of the backup. The only idea which I got was to write script like this:

Ping remote router through LAN1 port (with 24GHz antenna). LAN2 port (with 5GHz antenna) is disabled.
If fail, change default gateway and enable LAN2 port.
Ping router through the LAN1 port, if the connection will start work again, change GW and disable LAN2 back.
Do a search on "load balancing" and failover, you'll find lots of ways to achieve that on this forum.
It's a good idea or you have any better?
I didn't want to leave both antenna enabled, because I'm afraid of circulation of packets. Or not?

Thank you :)
It depends, are the router interfaces connecting to the antennas in a bridge or same layer 2 segment? if not (routing) you won't have loop problems.
 
Benik3
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Apr 04, 2013 11:41 am

Re: Backup connection with parallel antenna

Sun May 17, 2015 3:57 pm

Do a search on "load balancing" and failover, you'll find lots of ways to achieve that on this forum.
Thanks, I will look. I tried to search something related to "backup connection", but I wasn't very successful...
It depends, are the router interfaces connecting to the antennas in a bridge or same layer 2 segment? if not (routing) you won't have loop problems.
The antennas are routed not bridged. Each have own /29 address space...
So maybe just adding some packet prioritization (to make the most of the connection through the 24GHz antenna) and it will be good.


Thanks for the reply :)
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Backup connection with parallel antenna

Sun May 17, 2015 4:02 pm

Ok, as connections are routed, no loop problems to care about.

No need for traffic prorization, just set two default routes:

- One through the 24Ghz PTP remote IP, distance=1
- Another through the 5GHz PTP remote IP, distance=2

With this the 5Ghz link will only be used if the remote IP of 24GHz PTP link is unreachable.
 
TomosRider
Member Candidate
Member Candidate
Posts: 209
Joined: Thu Nov 20, 2014 1:51 pm

Re: Backup connection with parallel antenna

Tue May 19, 2015 11:34 am

Just following what pukkita said, route AD is the key. Router will choose route with smaller AD and if it becomes unavailable, it will go on second route.
 
Benik3
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Apr 04, 2013 11:41 am

Re: Backup connection with parallel antenna

Tue May 19, 2015 1:14 pm

Thanks!

I just tried it. In one direction it works OK (upload), in the second (download) it still split the connection on both antennas :/
I tried to set the GW on both routers...
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Backup connection with parallel antenna

Tue May 19, 2015 1:35 pm

You have to set the gateways on routers on both sides.
 
Benik3
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Apr 04, 2013 11:41 am

Re: Backup connection with parallel antenna

Tue May 19, 2015 8:07 pm

As I said, I did it on both routers.
Here are screenshots. In the first picture you can see, that the download stream is divided (it's not always 50:50) and routing table. This router is connected to our provider of connectivity (eth1)
The second screenshot is from second router (deeper in our network).
Any idea?

Thanks

P.S. The 10GHz is the 5GHz antenna which I mentioned, I just forgot that we changed it :D

EDIT: pictures deleted
Last edited by Benik3 on Wed May 20, 2015 12:12 am, edited 1 time in total.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Backup connection with parallel antenna

Tue May 19, 2015 10:37 pm

I supposed the scheme was router A <==== Wireless links =====> Router B.

If that is not the Scheme results won't be what expected.

I see you're already using OSPF, why don't you use interface costs?? just make interface cost on those with the 10GHz link higher than those connected to 24GHz links and OSPF will take care of the rest giving priority to paths with lower cost...
 
Benik3
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
Joined: Thu Apr 04, 2013 11:41 am

Re: Backup connection with parallel antenna

Tue May 19, 2015 10:42 pm

Yes. The scheme is like this. Exactly:
router A LAN1<--------24GHz wireless-------->LAN1 router B
router A LAN2<-------10GHz wireless-------->LAN2 router B

The cost on OSPF is good idea! I will test it, thanks! :)

EDIT: After setting OSPF interface cost and priority it works as it should. Thanks a lot! :)