Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 21944

Scripting • How to obtain nexthop value in a variable

$
0
0
Hello,

I'm using ROS 7.18.2

The router has two routes to the Internet and I'm using Check Gateway and that is working.

If the router switches to the backup link, I'd like to be notified.

I've worked out that I can monitor the uplink state by using the command:
/ip/route/check dst-ip=1.1.1.1 duration=1

This reports the following values:
status
interface
nexthop

I'm hoping that someone can tell me how to get nexthop into a variable.

I have done some searching, but the examples I have found are nothing like my situation and I can't figure out the syntax that I need to use or whether what I've described is actually possible.

Is this possible?

Thanks
VW

Statistics: Posted by VeeDub — Wed Apr 16, 2025 4:52 am



Viewing all articles
Browse latest Browse all 21944

Trending Articles