Quagga, ospf and high availability
We are using multiple pfsense clusters on our network with ospf for route distribution.
First time we used the patch to start quagga on master and to stop it on backup node. Our gateways are using CARP for fail-over. With this method, we lost a few ip packets (> 4 pings) :o when doing a fail-over. Other routers needs to wait for ospf dead timer (4 sec in our case) to rebuild routing tables and it costs a few seconds.
Now, instead of switching quagga on and off, quagga is running on the two nodes of the cluster with lower route cost on master.
Master: default route cost: 1
Backup: default route cost: 10
In the rc.carpmaster script we run this to change route priority dynamically to force other routers to get best path:
#! /bin/sh echo "config term interface vmx1 ip ospf cost 1 interface vmx3_vlan111 ip ospf cost 1 interface vmx3_vlan224 ip ospf cost 1 " | vtysh
According to rc.carpmaster, we run this in rc.carpbackup:
#! /bin/sh echo "config term interface vmx1 ip ospf cost 10 interface vmx3_vlan111 ip ospf cost 10 interface vmx3_vlan224 ip ospf cost 10 " | vtysh
Now with this setup, we don't lost any packet when doing a manual fail-over and only 2 pings when a power failure on master. ;D
I've recently coded a GUI addition to the Quagga OSPF plugin for doing just this. I'll be submitting a pull request in Github in the next week or so as i finalize a few tweaks.
This has really brought our HA router abilities to a new level and it's working well in our datacenters.