Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MikroTik script to monitor one interface and turn off another
:local EthMonitor "ether3"
:local EthTurnOff "ether1"
:local EthTurnOffStatus [:interface ethernet get $EthTurnOff disabled]
/interface ethernet monitor $EthMonitor once do={
:if ($status = "link-ok" && $EthTurnOffStatus ) do={ /interface ethernet set $EthTurnOff disabled=yes }
:if ($status != "link-ok" && !$EthTurnOffStatus ) do={ /interface ethernet set $EthTurnOff disabled=no }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.