Community discussions

MikroTik App
 
potskie
just joined
Topic Author
Posts: 1
Joined: Thu Nov 15, 2018 11:19 am

How to use netwatch in new RouterOS v7

Tue Dec 07, 2021 4:26 pm

Hello everyone, I really need help with regards to this new version. I have this new mikrotik RB5009UG+S+ with V7.0.5 with the setup of 3 ISP with fail over and load balancing. I was trying to implement a certain script using netwatch to disable or enable the ISP through routes if in case the ISP cant reach a certain dns(google) through pinging. I was following a certain tutorial but I got confused in the routing table. My routes script is currently like this:
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10 comment=ISP1
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.254.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10 comment=ISP2
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.17.254.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10 comment=ISP2
The tutorial guide I was following tells me to create netwatch code and a route rule just like this example:
/tool netwatch
add host=8.8.8.8 interval=10s down-script="/ip route disable [find comment=ISP1]" up-script="/ip route enable [find comment=ISP1]"
/ip route
add check-gateway=ping comment="Netwatch ISP1" distance=1 dst-address=8.8.8.8/32 gateway=IPofISP
My question now is if I create the ip route rule, in new version its asking me for routing table to which I presume it would be "main" and that should look like this
/ip route
add check-gateway=ping comment="Netwatch ISP1" distance=1 dst-address=8.8.8.8/32 gateway=192.168.1.1 routing-table=main 
I just want it to make sure that Im doing it correctly to make sure that it would work properly.
And one more thing. Ive noticed that in my new router with new version in the IP Routes that has "DAC" in the ISP, it no longer says reachable and if i open nexthops tab its gateway state is unreachable. But the internet is working. Hope someone could enlighten me about this. Thanks!
 
Nester
just joined
Posts: 1
Joined: Sun Oct 30, 2022 7:24 am

Re: How to use netwatch in new RouterOS v7

Sun Oct 30, 2022 10:48 am

Hi, did you find a solution?

Who is online

Users browsing this forum: No registered users and 25 guests