1
High availability / Re: CARP with DHCP on WAN
« on: November 01, 2021, 10:51:17 pm »
EDIT2: I misunderstood the use of pre-empt. As I now read it, pre-empt will address keeping all interfaces in a consistent state. More testing!
EDIT: I have done some additional digging and found that a script placed in /usr/local/rc.syshook.d/carp/ will be called when a carp event occurs. I have play around with this and now have something that works in the case that all 3 CARP interfaces on the primary go down - i.e. power failure; however, if there is a problem that say affects only the WAN interface, then the LAN interface is still pointing to the primary. More reading and testing needed lbe 11/02/2021
Has anyone found a hack that facilitates the OP request? Like the OP, I am fine with losing state. I would like to use the HA to keep everything else synced and just have a poor boy solution that will bring up the WAN interface (vtnet1) configured with an LAA MAC shared between the two firewalls in DHCP mode and then taking the WAN interface down when the primary is back in service.
I'm still too new to OPNsense (and HardenedBSD) to know how to implement the event detection and action. I do have many years of experience in Linux and other Unices and am glad to take a shot at writing the control scripts if someone know what hooks/APIs to use.
Thanks!
lbe
EDIT: I have done some additional digging and found that a script placed in /usr/local/rc.syshook.d/carp/ will be called when a carp event occurs. I have play around with this and now have something that works in the case that all 3 CARP interfaces on the primary go down - i.e. power failure; however, if there is a problem that say affects only the WAN interface, then the LAN interface is still pointing to the primary. More reading and testing needed lbe 11/02/2021
Has anyone found a hack that facilitates the OP request? Like the OP, I am fine with losing state. I would like to use the HA to keep everything else synced and just have a poor boy solution that will bring up the WAN interface (vtnet1) configured with an LAA MAC shared between the two firewalls in DHCP mode and then taking the WAN interface down when the primary is back in service.
I'm still too new to OPNsense (and HardenedBSD) to know how to implement the event detection and action. I do have many years of experience in Linux and other Unices and am glad to take a shot at writing the control scripts if someone know what hooks/APIs to use.
Thanks!
lbe