How to disable one VLAN and enable another when a specific IP address becomes unreachable, and then reenable the previous VLAN and disable the running VLAN when the IP address becomes reachable again. Does anyone have such a script?
In Tools->Netwatch add a new host +
Set the IP to monitor in the host field.
Under Down add the vlan to be down/uplike this:
interface/vlan/set vlan10 disabled=yes
interface/vlan/set vlan20 disabled=no
Under Up reverse the down
interface/vlan/set vlan10 disabled=no
interface/vlan/set vlan20 disabled=yes
NB, you can not use an IP that need the vlan to be monitored. How should it then ever enable the vlan.
\
Use Splunk> to log/monitor your MikroTik Router(s). See link below. ![]()
/interface vlan set vlan10 disabled=yes
/interface vlan set vlan20 disabled=no
Old standard:
/interface vlan set vlan10 disabled=yes
New standard
/interface/vlan/set vlan10 disabled=yes (may not work on 6.x)