I've seen a few questions which relate to this - but no answers , all of the respnses which liked ot Wiki Articles liked to no longer present wiki entries eg viewtopic.php?p=602282
sO I'm going to ask if there is any examples actually present and available
I have a Hex (no WiFi , 5 ports )RouterOS v6.49.7 (stable)
What I need to do is implement a Cisoc SLA type functionalllity I have an interface to a Starlink router DHCP set on Ether1 - I want to ping the "far" end and if it is up add the route otuerhwise delete the route -
The following is sort of psedo code so ignore syntax errors
rem First see if the interface is working and can get to the internet - should fail instantly if interface is down otherwise if starlink is not working should get timeouts
rem TODO probably need to select some starlink specific address first and if they fail just about quickly eg 192.168.100.1 which is the disk - sopme CGNAT 10.x.x..x address which is the downlinkg station if I can work it out
:set rc1 ([/ping 8.8.8.8 interface=ether1 count=2] )
:set rc2 ([/ping 2.2.2.4 interface=ether1 count=2] )
set $RC3 0
:if (($rc1 >0) ||($rc2 >0 ) do :set $RC3 1
rem Now iif we can get out add the route to the starlink router which is 192.168.1.1 - and is not changable
:if (($rc1 =1) do /ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1
:if (($rc1 =0) do /ip route remove dst-address=0.0.0.0/0 gateway=192.168.1.1
It seems fairly simple - I need to declare variables etc but does this make sense ? Am I not finding articles which address this?
I still need to find a scheduling example but the interface looks ok
I will be trying this out , but am quite busy so it will be some time - so I was hoping to find an example but did not
Does anyone have any pointers?