Startup CARP after Quagga?
-
Does anyone know how I can start Quagga OSPF earlier during system boot, or start CARP later?
Background:
I have a pair of pfSense appliances setup to be redundant routers (eg, NAT is disabled). They have Quagga OSPF installed & configured for routing to the "uplink" network. I have them utilizing CARP to present a single IP for all the client machines on one interface to use as a default router.Everything seems to work fine, including one of the units "failing" (eg, I turned it off). The routers update correctly for OSPF, the backup for CARP takes over the address, and the whole process goes off with just a small pause while routers update their best path.
I included a crudely-drawn image of what I hopefully explained for reference.
The issue:
When the "master" for CARP comes back online, it will grab the CARP address before Quagga OSPF starts up, which means it has no knowledge of how to route anything for a minute. So I need to have Quagga OSPF initialize before CARP sets itself back up as a master.I suppose I might try a workaround of having the routers each use each other as a default route. That seems like a hacky design, imo, and it does not appear that pfSense has the ability to set a default gateway with a high metric (eg, something it would use only if no default route learned by OSPF would be available).

 -
The workaround:
Since trying to find a way to get CARP to startup after Quagga OSPF seemed a bit futile, and obviously FreeBSD has no metrics to use for static routes, I needed another solution.
It finally occurred to me that if CARP just wouldn't steal the IP back, then the solution would be pretty obvious. Leave the IP with whoever has it at that time. Turns out this works pretty well:
Added sysctl: net.inet.carp.preempt = 0
Adjust CARP entries (which in my case included turning off synchronization) to have the advertising base/skew set the same.So, now when my router fails, it's just a matter of a second or two while routing tables update their states to stop trying to send traffic through the failed device.