I wanted to cast some attention on the excellent work ‘nathan1’ did with his high availability scripts.
A pair of routers essentially use dedicated interfaces as HA heartbeat and configuration synchronisation ports. VRRP essentially governs master status and slave has all other interfaces administratively disabled. Manage the acting master as a single device, no need to create vrrp interfaces, grow subnets or implement STP. Failover takes 10 seconds.
Master essentially generates backups every 10 minutes and slave restores these if there’s a change. Converted 3 pairs of convoluted vrrp routers, which also bridge vlans between sites using VPLS. These historically required complicated scripts, to avoid bridging loops, as customer’s RPVST+ Cisco network stack isn’t compatible with per VLAN RSTP.
Overview:
- Interconnect two matching RouterBoards
- Use switching stack to hand off external links as vlans to lacp bonds to both routers (helps if switch has the Cisco ‘dot1q-tunnel’ equivalent feature)
- Clear slave router
- Copy HA_init.rsc to primary router
- Run ‘$HAInstall interface=“ether8” macA=“[MAC_OF_A_ETHER8]” macB=“[MAC_OF_B_ETHER_8]” password=“[secret]”’ on master, via SSH session. Initial master election takes 2 seconds, this will result in mac based Winbox sessions closing. Connect via TCP (eg SSH) so that you can copy the bootstrap commands for the standby router.
- MAC telnet to the slave and run the provided commands.
- Wait 10 minutes or force the initial sync from the acting master by running ‘$HASyncStandby’
- Watch HA interface status by tailing log file (/log print follow)
Then simply reboot the acting master to test fail over…
The matter is discussed in more detail here:
http://forum.mikrotik.com/t/suggestion-completely-virtual-router-based-on-two-physical-routers/100272/1