Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    CARP with DHCP - Non Zero Demotion Status

    Scheduled Pinned Locked Moved HA/CARP/VIPs
    3 Posts 2 Posters 90 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      t04s
      last edited by

      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

      T R 2 Replies Last reply Reply Quote 0
      • T
        t04s @t04s
        last edited by t04s

        Bump, does anyone know a reason this script would interfere with CARP functionality or a way to get more log information?

        Thanks.

        1 Reply Last reply Reply Quote 0
        • R
          reinvtv @t04s
          last edited by

          @t04s

          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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.