CARP with DHCP - Non Zero Demotion Status
-
Hi,
I have two pfSense 2.7.2 identical boxes with which I want CARP VIPs on both the WAN and LAN. I have configured CARP many times but on this occasion the WAN only has one IP and it has to be assigned via DHCP from the ISP.
Therefore I can only use CARP on the LAN side (igb0) and have created a script in /usr/local/etc/devd/carp.conf for the WAN on both boxes as:
notify 200 { match "system" "CARP"; match "type" "MASTER"; action "ifconfig igb5 up; /usr/local/sbin/pfSctl -c 'interface carpmaster $subsystem'"; }; notify 200 { match "system" "CARP"; match "type" "BACKUP"; action "ifconfig igb5 down; /usr/local/sbin/pfSctl -c 'interface carpbackup $subsystem'"; };
I have duplicated the MAC of the WAN interface on the master to the backup. This works great in terms of the WAN interface (igb5) comes up on the second box and is disabled on the master during failover. The problem is I immediately get the error on the second box about 'CARP has detected a problem and this unit has a non-zero demotion status.' Looking at the system log it shows a demotion even from -240 to -240 which seems like a problem. This means it doesn't preempt failing back automatically, and I have to rid the error and do it manually.
If I remove the script, everything works as expected with just the LAN interface and CARP VIPs.
Any ideas why the script seems to be affecting CARP demotion and failover?
Thanks,
t04s -
Bump, does anyone know a reason this script would interfere with CARP functionality or a way to get more log information?
Thanks.
-
not sure, but i suggest you look at this one:
https://forum.netgate.com/topic/185693/ha-setup-with-multi-wan-and-dhcp-guide
you can get the devd system to only run on specific vhid events.