what is the idea ?
if you have 2 wireless link going to one mikrotik routerboard as 4011rb ccr1016 and you dont want to use bonding for (failover layer2) such active-backup or bgb, ospf failover and others so the script will do it for you so example
ether1 -link 1 main enabled
ether2 -link 2 backup - disabled
when the ether1 goes down and the ether status will be(no-link) it will enable the ether2 if the ether1 goes up and (link ok) it will stop the ether2link
and enable the ether1 no matter how you configuration is inside bridge port or take service from vlans so let you with script and note that you should change the name of ether inside the script
Code: Select all
#this code just to on or off the main or backup ethers if the main fails and no link status it will run the ether2 link backup#
interface ethernet monitor ether1 once do={:if (status =no-link) do={:interface ethernet set ether2 disabled=no} else={:interface ethernet set ether2 disabled=yes}}
#if you have vlans coming from the ap or the isp and should change the interfaces when swap between the main and backup links as my configuration it will be
interface ethernet monitor ether1 once do={:if (status =no-link) do={:interface ethernet set ether2 disabled=no; /interface vlan set vlan60,vlan61 interface=ether2} else={:interface ethernet set ether2 disabled=yes; /interface vlan set vlan61,vlan60 interface=ether1}}