The official Mikrotik router thread

Hi everyone,

I have an issue that I've been advised that a Mikrotik device might be able to help with. I was wondering whether any Mikrotik expert may be able to advise me better.

I have a set up whereby I have two internet connections, one a Rain 5G router which I use as my main internet as it is faster, and a slower fibre connection (connected to a Netgear router) which I use when the Rain is down due to load shedding. The two routers are 20 metres away from my room and cannot be relocated closer, therefore I have set up an ethernet cable which runs from one of the routers at a time to a Unifi set up in my room (an access point for wi-fi and a switch for LAN connections). The Netgear router and fibre connection is connected to a UPS and when there is load shedding, it still works. The Rain 5G router, even if connected to a UPS, doesn't work during load shedding. It doesn't pick up any signal, most likely because a tower is down or something, so cannot be used.

When the power goes out I have to go to the routers and physically disconnect the cable from the Rain router and connect it into the Netgear router. Then when the power comes back and the Rain starts working again, I go and swap them back.

What I wanted to find out is if there is any way that I could create a set up whereby the internet would automatically switch over to the fibre Netgear router when there is no power to the Rain, and switch back when the power comes back. I'm prepared to buy any hardware or software necessary to make this work.

I'm told I can connect both to a Mikrotik router and have a config file that can manage switching between the two when the one goes down. However I have 0 experience with this. Could anyone advise if this is possible and which device I would need, as well as how to set up the config file?

Your assistance would be appreciated. Thanks
 
Hi everyone,

I have an issue that I've been advised that a Mikrotik device might be able to help with. I was wondering whether any Mikrotik expert may be able to advise me better.

I have a set up whereby I have two internet connections, one a Rain 5G router which I use as my main internet as it is faster, and a slower fibre connection (connected to a Netgear router) which I use when the Rain is down due to load shedding. The two routers are 20 metres away from my room and cannot be relocated closer, therefore I have set up an ethernet cable which runs from one of the routers at a time to a Unifi set up in my room (an access point for wi-fi and a switch for LAN connections). The Netgear router and fibre connection is connected to a UPS and when there is load shedding, it still works. The Rain 5G router, even if connected to a UPS, doesn't work during load shedding. It doesn't pick up any signal, most likely because a tower is down or something, so cannot be used.

When the power goes out I have to go to the routers and physically disconnect the cable from the Rain router and connect it into the Netgear router. Then when the power comes back and the Rain starts working again, I go and swap them back.

What I wanted to find out is if there is any way that I could create a set up whereby the internet would automatically switch over to the fibre Netgear router when there is no power to the Rain, and switch back when the power comes back. I'm prepared to buy any hardware or software necessary to make this work.

I'm told I can connect both to a Mikrotik router and have a config file that can manage switching between the two when the one goes down. However I have 0 experience with this. Could anyone advise if this is possible and which device I would need, as well as how to set up the config file?

Your assistance would be appreciated. Thanks
Definitely possible with a mikrotik, however depending on your tech experience might be a challenge for you to setup, but not impossible, very do-able.

When you get the mikrotik, you would need to delete the default switch config, as it usually configure eth1 as wan and eth2-5 in a switch.

You would technically need eth1 for wan1 (rain) and eth2 for wan2 (fibre).
Then a static route to always route over rain1/wan1 for testing. Something like to 1.0.0.2/32 range. Then you have a watchdog script that test this route, if it pings, use rain/wan1. If 5 pings fail, switch off default route over wan1/rain and let another default route with lower priority on wan2/fibre take over. When that ping starts working again, wan1/rain takes over again.

I still have to implement this myself, just havent made the time yet.
 
Setup your fibre to have a lower priority default route

If your rain router powers off when there is no power then the interface should go down and its default route removed
 
When the power returns the connection tracking will still try send open connections via the fibre, you will either have to wait for the timeout (offhand think its 30-60s) or disable and renable the fibre interface, for this reason @Tinuva 's netwatch method may be better as then you can script this also
 
Definitely possible with a mikrotik, however depending on your tech experience might be a challenge for you to setup, but not impossible, very do-able.

When you get the mikrotik, you would need to delete the default switch config, as it usually configure eth1 as wan and eth2-5 in a switch.

You would technically need eth1 for wan1 (rain) and eth2 for wan2 (fibre).
Then a static route to always route over rain1/wan1 for testing. Something like to 1.0.0.2/32 range. Then you have a watchdog script that test this route, if it pings, use rain/wan1. If 5 pings fail, switch off default route over wan1/rain and let another default route with lower priority on wan2/fibre take over. When that ping starts working again, wan1/rain takes over again.

I still have to implement this myself, just havent made the time yet.
Many thanks for your responses.

I will definitely give this a go.

Is there any Mikrotik unit you would recommend or would any one work for this purpose.
 
When the power returns the connection tracking will still try send open connections via the fibre, you will either have to wait for the timeout (offhand think its 30-60s) or disable and renable the fibre interface, for this reason @Tinuva 's netwatch method may be better as then you can script this also

For UDP based connections this is pretty much a requirement, UDP connections sometimes never time out and will hang forever, I have found this happening with WireGuard VPN tunnels and VOIP (SIP traffic).
An alternative to dropping the interface is you can clear the open connections using the following command in a script:

Code:
/ip firewall connection remove [find];
 
Last edited:
Many thanks for your responses.

I will definitely give this a go.

Is there any Mikrotik unit you would recommend or would any one work for this purpose.
Any 5 port mikrotik will do. They all have this capability. I'd say, try at least get one with gig ports.
 
Good morning All.
Not nearly advanced as some of you guys so please excuse my ignorance. Got a MikroTik Router from current ISP. Trying to config TP Link WiFi Routers as range extenders. They do connect to the network with no internet. Will appreciate if someone can please assist this dummy. (apologies if this is the wrong place for the question. really tried looking where to post this)
Cheers!
 

Attachments

  • 20230117_081908.jpg
    20230117_081908.jpg
    210.9 KB · Views: 16
  • 20230117_081946.jpg
    20230117_081946.jpg
    114 KB · Views: 16
  • 20230117_081927.jpg
    20230117_081927.jpg
    79.2 KB · Views: 15
Good morning All.
Not nearly advanced as some of you guys so please excuse my ignorance. Got a MikroTik Router from current ISP. Trying to config TP Link WiFi Routers as range extenders. They do connect to the network with no internet. Will appreciate if someone can please assist this dummy. (apologies if this is the wrong place for the question. really tried looking where to post this)
Cheers!
Nothing to do with the MikroTik really, you're going to have to turn off the DHCP server on the TP-Links and change their IP addresses to something like 192.168.1.2 etc.

Or just check if your TP-Links have access point mode you can turn on.
 
Good morning All.
Not nearly advanced as some of you guys so please excuse my ignorance. Got a MikroTik Router from current ISP. Trying to config TP Link WiFi Routers as range extenders. They do connect to the network with no internet. Will appreciate if someone can please assist this dummy. (apologies if this is the wrong place for the question. really tried looking where to post this)
Cheers!
Do some documenting for us here (I do believe @Soul Assassin is correct in his assumption though)

  • Model numbers of the TPLink(s)
  • Note the IP address your devices get when accessing the TP-Link (note the IP of your Gateway specifically)
  • Note the IP address your devices get when accessing the Mikrotik (note the IP of your Gateway specifically)
Upload some screenshots of your configuration in the TP-Link

Depending on your Mikrotik configuration, the IP range might be the factory default 192.168.88.1.. so we will need some tinkering with the setup on each device individually.
 
Hi @Anthro @Soul Assassin and @r00igev@@r
I have the following:
1 x TL-WA850RE (no accesspoint option)
1 x TL-WA901ND
1 x TL-WR940N
What's just strange, is I have reconfig the 1st one and now it doesn't even want to connect to this "new" network even with the settings the same as the main router.
On the WA901ND this is what I can choose...
1673963610455.png
This is what the settings are on Access Point configs
1673963775916.png
With the above settings, this is what I get....
1673964091179.png

Thanks guys.... (ek weet nie meer nie)
 
Hi @Anthro @Soul Assassin and @r00igev@@r
I have the following:
1 x TL-WA850RE (no accesspoint option)
1 x TL-WA901ND
1 x TL-WR940N
What's just strange, is I have reconfig the 1st one and now it doesn't even want to connect to this "new" network even with the settings the same as the main router.
On the WA901ND this is what I can choose...
You are not getting an IP from the Mikrotik as 192.168.0.254 is the default for the tp-link. We dont even know if your mikrotik ports are bridged, but they probably are so its like a switch.

Did you test that you get Internet / IP using the mikrotik ethernet to your laptop / PC ethernet. If that works start a tplink thread :)
 
Anyone got any tips for me on best UPS for my Mikrotik Router and Router Switch? Am looking at the Gizzu range...
 
Top
Sign up to the MyBroadband newsletter
X