Community discussions

MikroTik App
 
petern
newbie
Topic Author
Posts: 27
Joined: Wed Dec 13, 2017 5:58 pm

Routing Failover without Scripting

Fri Sep 28, 2018 6:11 pm

I've been trying to set up routing failover by following information from here:

https://wiki.mikrotik.com/wiki/Advanced ... _Scripting

While the gateway-status of the Host1 route is reachable, however the gateway-status of the default route via Host1 says "Host1 unreachable".

0 S dst-address=0.0.0.0/0 gateway=1.1.1.1 gateway-status=1.1.1.1 unreachable distance=1 scope=30 target-scope=10 routing-mark=ISP
1 A S dst-address=1.1.1.1/32 gateway=ISP gateway-status=ISP reachable distance=1 scope=10 target-scope=10

Would this be related to this topic? viewtopic.php?t=84970
Is there a way to get this working?
 
stoser
Member Candidate
Member Candidate
Posts: 120
Joined: Sun Aug 21, 2016 12:04 am

Re: Routing Failover without Scripting

Fri Sep 28, 2018 10:02 pm

Try putting an IP address for the gateway in the route with scope 10

specifically change "ISP" in the route below to the gateway address of your ISP
1 A S dst-address=1.1.1.1/32 gateway=ISP gateway-status=ISP reachable distance=1 scope=10 target-scope=10

I have not been able to get recursive routing failover to work with named interfaces, only with IP addresses. I can't even get them to work with the % syntax, to specify an IP gateway and a specific interface ... it seems to only want an IP address...
 
sindy
Forum Guru
Forum Guru
Posts: 6255
Joined: Mon Dec 04, 2017 9:19 pm

Re: Routing Failover without Scripting

Fri Sep 28, 2018 10:33 pm

I have not been able to get recursive routing failover to work with named interfaces, only with IP addresses. I can't even get them to work with the % syntax, to specify an IP gateway and a specific interface ... it seems to only want an IP address...
...which is exactly what the documentation says. The original purpose of recursive next hop search is for dynamic routing protocols to which interface names don't fit well.

However, you can use the remote address of the PPPoE interface as a gateway in the bottom-most recursive route. You cannot attach a script to /interface pppoe-client directly, but you can use a ppp profile for that. See this recent topic on how to do that.
Instead of writing novels, post /export hide-sensitive. Use find&replace in your favourite text editor to systematically replace all occurrences of each public IP address potentially identifying you by a distinctive pattern such as my.public.ip.1.
 
stoser
Member Candidate
Member Candidate
Posts: 120
Joined: Sun Aug 21, 2016 12:04 am

Re: Routing Failover without Scripting

Sat Sep 29, 2018 6:13 pm

sindy, thanks for the link to the other forum topic. Very informative, especially the parts dealing with PPPoE. Kind regards -

Who is online

Users browsing this forum: Bing [Bot], brg3466, edwinlai33, sumandhabneha and 211 guests