Community discussions

MikroTik App
 
User avatar
JaZzSuperman
just joined
Topic Author
Posts: 12
Joined: Sun Oct 09, 2016 9:55 am
Location: United Kingdom
Contact:

LTE Failover

Tue Mar 27, 2018 10:49 am

Good Day

I wonder if any one would be able to help me with a simple config?

I am trying to setup a Mikrotik Router with a secondary Fail-over for when my primary Line goes down.

Ethernet 1 - Internet Port "My ADSL Router is connected to this port and is my primary internet"
Ethernet 2 - " This port has my Hauwei LTE router connected to it"

Basically what I want to do, is have it that when my adsl line goes down, I would like to have the LTE router provide my network with Internet, without me having to unplug my ADSL router and then
replace it by having to plug in my LTE router into Ethernet 1.

Does anyone know a easy why to do this?
 
rokkhan
just joined
Posts: 4
Joined: Mon Apr 23, 2018 5:52 pm

Re: LTE Failover

Mon Apr 23, 2018 5:55 pm

I am also looking for a solution like these. Anyone?
 
rokkhan
just joined
Posts: 4
Joined: Mon Apr 23, 2018 5:52 pm

Re: LTE Failover

Mon Apr 23, 2018 5:57 pm

Hi,
I am also looking for a solution like this one. Anyone?
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: LTE Failover

Tue Apr 24, 2018 7:29 pm

 
User avatar
LogicalNZ
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Sat Oct 19, 2013 6:35 am
Location: New Zealand
Contact:

Re: LTE Failover

Mon Jul 02, 2018 10:51 am

I have been doing some testing with this configuration. Are you sure that it is correct?

The testing I have done shows that this configuration does not work....

How in the /routing section can you have a gateway of host1 or host2. This makes no sense.

Let’s say host1 = 8.8.8. And host2 = 4.4.4.4 (hosts are what is being pinged to ensure you can route via a particular isp)

How can you set the gateway of the route to these hosts?

Maybe I’m just being dumb but also had a colliege have a look at this and he also is struggling to see how this can work....

Thanks in advance
 
nikc
Member Candidate
Member Candidate
Posts: 208
Joined: Wed Jul 13, 2016 6:05 pm

Re: LTE Failover

Mon Jul 02, 2018 12:10 pm

How can you set the gateway of the route to these hosts?
Do you mean like this:
Image
 
User avatar
LogicalNZ
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Sat Oct 19, 2013 6:35 am
Location: New Zealand
Contact:

Re: LTE Failover

Mon Jul 02, 2018 12:30 pm

Hey Nic,

What you have put makes sense, but is NOT what the configuration on the Mikrotik website shows...

\route
add distance=1 gateway=Host1 routing-mark=ISP1 check-gateway=ping

the above shows that host1 would actually be the gateway address (you have put pppoe-out1 according to the above in your configuration should be 8.8.8.8)

This makes no sense to me...
 
nikc
Member Candidate
Member Candidate
Posts: 208
Joined: Wed Jul 13, 2016 6:05 pm

Re: LTE Failover

Mon Jul 02, 2018 12:43 pm

What i use this for is to force all icmp out via ISP one link (ppoe1-out) ...

I have a similar rule for another host that just has a different dest ip and different gateway for the traffic (dest = 8.8.4.4 and link = ppoe-out).

These routes are specifically there for my netwatch scripts to determine if a link is up or not ... and if not then adjust routing.
 
User avatar
LogicalNZ
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Sat Oct 19, 2013 6:35 am
Location: New Zealand
Contact:

Re: LTE Failover

Mon Jul 02, 2018 10:21 pm

Hey Nic,

I'm by no means saying what you are doing is wrong, what I'm saying is that it is NOT what is on the Mikrotik fail over configuration as published on the Mikrotik website.

Has ANYONE actually made this configuration on the Mikrotik website actually work?
 
oldcrow
just joined
Posts: 21
Joined: Sun Jul 15, 2018 11:04 am

Re: LTE Failover

Tue Dec 11, 2018 3:33 am

Most non script efforts are defeated by MT dynamic route which does not allow for editing. If the distance of the failover let or whatever is higher then it only kicks in if primary wan down.
For late use dhcp client as per spider web solutions. Set distance higher than 2. 3 needed on my hap ac2
Cheers
Oldcrow
 
WeWiNet
Long time Member
Long time Member
Posts: 592
Joined: Thu Sep 27, 2018 4:11 pm

Re: LTE Failover

Tue Dec 11, 2018 2:06 pm

Have you guys tried this one: https://wiki.mikrotik.com/wiki/Manual:PCC
The example only checks next GW but you can add additional GW check and target hosts to ping as you want.

This one does it for me (DSL with LTE load balancing/failover).
 
oldcrow
just joined
Posts: 21
Joined: Sun Jul 15, 2018 11:04 am

Re: LTE Failover

Sun Jan 06, 2019 5:03 am

Hi WeWiNet

Are you sure this is right?
Is not what is proposed in the PCC load balance (and failover is secondary to that). OP wants failover and when I put this in my system I continue to see activity on the lte interface, I suspect due to the default route taking precedence over any static routes by setting a distance of 0.
Am I correct in thinking this just increases the route distance for one of two streams of marked packets?

As yet I can only find scripts to turn and off the second interface by status of first interface to achieve what he requested.

regards
oldcrow.
 
oldcrow
just joined
Posts: 21
Joined: Sun Jul 15, 2018 11:04 am

Re: LTE Failover

Sun Jan 06, 2019 3:15 pm

Hi JazZSuperman

oops

my comments were for a lte interface, re read your post and realised that dynamic script should not be an issue.

If you only need failover then::
Just set the ip route distance on ethernet2 subnet to be > than the route distance on ethernet1 (likely to be 0 or 1 as it will likely be dynamically assigned). As ADSL fails packets will route to ethernet2 and when it comes back on they will go back to ethernet1.

If I recall correctly you may be able to set the distance in the DHCP client for ethernet2 if you are dynamically creating the route that way.but static route should work too.

some of the MT router's dhcp clients may not pick up on the DNS changes as the network redirects outgoing packets so likely worthwhile to set one static for each network.

cheers
oldcrow.
 
mkrt012
just joined
Posts: 1
Joined: Wed Sep 04, 2019 6:27 pm

Re: LTE Failover

Wed Sep 04, 2019 7:18 pm

Hello,
I am begginer and i'm trying to setup failover from this link: https://wiki.mikrotik.com/wiki/Advanced ... _Scripting

But it just doesn't work. I input exactly what guide asked - but for some reason gateways created in step 2 and 3 are not reachable by router.

My setup:
ether1 - cable to internet router
lte1 - lte connection (tested, wokring)

So i use these commands:
/ip route
add dst-address=Host1 gateway=GW1 scope=10
add dst-address=Host2 gateway=GW2 scope=10
add distance=1 gateway=Host1 routing-mark=ISP1 check-gateway=ping
add distance=2 gateway=Host2 routing-mark=ISP1 check-gateway=ping
add distance=1 gateway=Host2 routing-mark=ISP2 check-gateway=ping
add distance=2 gateway=Host1 routing-mark=ISP2 check-gateway=ping

/ip route
add dst-address=8.8.8.8 gateway=ether1 scope=10
add dst-address=1.1.1.1 gateway=lte1 scope=10
add distance=1 gateway=8.8.8.8 routing-mark=ISP1 check-gateway=ping
add distance=2 gateway=1.1.1.1 routing-mark=ISP1 check-gateway=ping
add distance=1 gateway=1.1.1.1 routing-mark=ISP2 check-gateway=ping
add distance=2 gateway=8.8.8.8 routing-mark=ISP2 check-gateway=ping

But it just doesnt work. I attached picture with routes any suggestions ?

Also, here is export from my terminal:
[admin@MikroTik] > export
# sep/04/2019 18:15:53 by RouterOS 6.45.5
# software id = BV64-SKIK
#
# model = RouterBOARD M33G
# serial number = A2FD0960F69B
/interface ethernet
set [ find default-name=ether1 ] speed=100Mbps
set [ find default-name=ether2 ] speed=100Mbps
set [ find default-name=ether3 ] speed=100Mbps
/interface lte
set [ find ] band=7,20 mac-address=AC:FF:FF:00:00:00 mtu=1428 name=lte1 \
network-mode=lte pin=0000
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp_pool0 ranges=192.168.88.2-192.168.88.100
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool0 disabled=no interface=ether3 \
lease-time=10h name=dhcp1
/ip address
add address=192.168.88.1 interface=ether3 network=192.168.88.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat
/ip route
add check-gateway=ping distance=1 gateway=8.8.8.8 routing-mark=ISP1
add check-gateway=ping distance=2 gateway=1.1.1.1 routing-mark=ISP1
add check-gateway=ping distance=1 gateway=1.1.1.1 routing-mark=ISP2
add check-gateway=ping distance=2 gateway=8.8.8.8 routing-mark=ISP2
add distance=1 dst-address=1.1.1.1/32 gateway=lte1 scope=10
add distance=1 dst-address=8.8.8.8/32 gateway=ether1 scope=10
add comment="ETHER3 to NOTE" distance=1 dst-address=192.168.88.0/24 gateway=\
ether3 pref-src=192.168.88.1
/system clock
set time-zone-name=Europe/Bratislava
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: anav, CGGXANNX, hubi, menyarito, mkx and 62 guests