Community discussions

MikroTik App
 
careonecomm
just joined
Topic Author
Posts: 7
Joined: Tue Sep 13, 2016 8:20 pm

LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Tue May 24, 2022 4:42 am

Hello, I just bough an https://mikrotik.com/product/wap_lte_kit and would like to do the following:

-lte1 is receiving a public DHCP address from the APN (WAN)
-ether1 is with WAN
-wlan1 is the LAN (with dhcp server and NAT)

I can manually play the failover changing the distance of the ether1, however I would like to find a script that could work with lte1

Thing is:
Info I found is related to scenarios in where you need to modify the routes, in the case of lte1 interface is not possible to enable the check-ping or add the route manually, so I was thinking if possible to use recursive routing like here https://help.mikrotik.com/docs/pages/vi ... d=26476608 to do what I need without touch the lte routes.
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Tue May 24, 2022 9:38 pm

You have few options.

Easier method is to set a optional route in APN setings of LTE. Your ether1 have own RecursiveRoute checked path as main ISP.
This way your ether ISP can be main and lte will be used automatically when ether not pass to internet.

Opposite way is harder, to make lte1 as main in RecuRouting and backup to ether1. Dynamic interface cannot be used in RR way :(.

You not write clear, what of this scenario you want use, or I not understand that. Please, clear your idea.
btw, I hope that ether1 is a static IP, not dhcp.
 
careonecomm
just joined
Topic Author
Posts: 7
Joined: Tue Sep 13, 2016 8:20 pm

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Wed May 25, 2022 3:22 pm

You have few options.

Easier method is to set a optional route in APN setings of LTE. Your ether1 have own RecursiveRoute checked path as main ISP.
This way your ether ISP can be main and lte will be used automatically when ether not pass to internet.

Opposite way is harder, to make lte1 as main in RecuRouting and backup to ether1. Dynamic interface cannot be used in RR way :(.

You not write clear, what of this scenario you want use, or I not understand that. Please, clear your idea.
btw, I hope that ether1 is a static IP, not dhcp.
Yes the idea is to have ALWAYS ether1 main and lte1 backup (working when ether1 is off or not able to reach certain hosts like the failover example in confluence)

ether1 public Dynamic :(

I was using this script to generate the routes for ether1, and that seems to work, however I do not understand how to mix this with the general failover idea:

viewtopic.php?t=157048#p853511

However, I'm fully open to the _easiest_ path to do it.


Thanks
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Wed May 25, 2022 4:43 pm

Have a look at para I ( J-L also may apply ) - viewtopic.php?t=182373
 
User avatar
SiB
Forum Guru
Forum Guru
Posts: 1888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Sat May 28, 2022 12:38 am

I see your "fancy" way but for me it's a big big workaround by scirpt.
Even you Public IP on ehter1 is dynamic, probably by DHCP-CLIENT - you not confirm that.
If this is DHCP Client then why not do a "route rules" in a game ?

Try this:
  • Step 1
    in DHCP Client you can enter a script who will use some build-in variables, and try this one line put in dhcp-client script:
    /ip route add dst-address=9.9.9.9 gateway=$gateway-address check-gateway=ping scope=10
    now your dhcp client create this main scope10 rule who is base with your real ISP gateway IP.
  • Step 2
    /routing filter add chain=dynamic-in set-check-gateway=ping set-in-nexthop=9.9.9.9 set-route-comment=WANx
    This static rule detect any new Dynamic inteface and change them check-gateway to ping, gateway to 9.9.9.9 what we use in step1 and set some your command like WANx.

I just say, maybe that 2 line of additional code is simplicity in your situation... without big scripts.
This is just a suggestion and they are on RouterOS many ways to solve one problem. But I think you should test this.
 
careonecomm
just joined
Topic Author
Posts: 7
Joined: Tue Sep 13, 2016 8:20 pm

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Tue Jun 07, 2022 4:22 pm

I see your "fancy" way but for me it's a big big workaround by scirpt.
Even you Public IP on ehter1 is dynamic, probably by DHCP-CLIENT - you not confirm that.
If this is DHCP Client then why not do a "route rules" in a game ?

Try this:
  • Step 1
    in DHCP Client you can enter a script who will use some build-in variables, and try this one line put in dhcp-client script:
    /ip route add dst-address=9.9.9.9 gateway=$gateway-address check-gateway=ping scope=10
    now your dhcp client create this main scope10 rule who is base with your real ISP gateway IP.
  • Step 2
    /routing filter add chain=dynamic-in set-check-gateway=ping set-in-nexthop=9.9.9.9 set-route-comment=WANx
    This static rule detect any new Dynamic inteface and change them check-gateway to ping, gateway to 9.9.9.9 what we use in step1 and set some your command like WANx.

I just say, maybe that 2 line of additional code is simplicity in your situation... without big scripts.
This is just a suggestion and they are on RouterOS many ways to solve one problem. But I think you should test this.
Yes, DHCP Client.

Ill be testing this and will let you know my results. Thanks!
 
careonecomm
just joined
Topic Author
Posts: 7
Joined: Tue Sep 13, 2016 8:20 pm

Re: LTE KIT - ether1 (WAN) LTE (WAN) wlan1 (LAN) Failover

Tue Jun 07, 2022 5:27 pm

I see your "fancy" way but for me it's a big big workaround by scirpt.
Even you Public IP on ehter1 is dynamic, probably by DHCP-CLIENT - you not confirm that.
If this is DHCP Client then why not do a "route rules" in a game ?

Try this:
  • Step 1
    in DHCP Client you can enter a script who will use some build-in variables, and try this one line put in dhcp-client script:
    /ip route add dst-address=9.9.9.9 gateway=$gateway-address check-gateway=ping scope=10
    now your dhcp client create this main scope10 rule who is base with your real ISP gateway IP.
  • Step 2
    /routing filter add chain=dynamic-in set-check-gateway=ping set-in-nexthop=9.9.9.9 set-route-comment=WANx
    This static rule detect any new Dynamic inteface and change them check-gateway to ping, gateway to 9.9.9.9 what we use in step1 and set some your command like WANx.

I just say, maybe that 2 line of additional code is simplicity in your situation... without big scripts.
This is just a suggestion and they are on RouterOS many ways to solve one problem. But I think you should test this.
No success, but one strange thing is that when ether1 lose connection, LTE works only to ping 8.8.8.8 (no other routes are possible)
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Netstumble, Pea and 43 guests