Scenario
You are operating an OPNsense HA pair in active/passive. The following symptoms appear:
- Both nodes report
carp: MASTERfor the same VHID on the interface the VIP is bound to - Duplicate IP / MAC entries appear in downstream switches’ MAC tables
- Intermittent packet loss as switches flap between the two nodes
Available evidence:
ifconfig igb0on both nodes showscarp: MASTER vhid 1, andnet.inet.carp.demotionis 0 on bothtcpdump -n -i igb0 proto carpon each node shows only that node’s own advertisements for the VHID- The pfsync link is healthy —
ifconfig pfsync0reportssyncok: 1and the two state counts match
Your task
Determine the cause, recover, document, and validate.
Investigation
The investigation follows the discipline taught in Part XXVII:
- Form hypothesis, find evidence, test, validate.
- Use the available evidence above to bound the search.
- Reach one of the likely root causes.
Recovery procedure
(Do not reveal until you have reasoned through the problem.)
- Identify the failing component.
- Apply the remediation pathway.
- Validate with the verification step.
- Document the incident.
Remediation
- On each node, run
ifconfigagainst the VIP parent interface and confirm both reportcarp: MASTERfor the same VHID. 2. Runtcpdump -n -i <parent> proto carpon both nodes, on that same parent interface. If each node sees only its own advertisements, the parent segment is broken — check the switch port, the VLAN, port isolation and multicast filtering for224.0.0.18. If each node sees the other’s advertisements and both stay MASTER, checknetstat -s -p carpfor a rising “discarded for bad authentication” count and compare the CARP password on both nodes. 3. Repeat for every VIP parent interface; a pair can be split on one segment and healthy on another. 4. Once the cause is known, demote one node — Interfaces → Virtual IPs → Status → Enter Persistent CARP Maintenance Mode — so the network settles on a single master while the segment is repaired.
Verification
Only one node reports carp: MASTER for each VHID and the other reports BACKUP; a capture on each VIP parent interface shows advertisements from both nodes; switches show a single MAC for each VIP; downstream traffic uses one path. Run a controlled failover test.
Rollback
Clear the demotion on the node that was demoted — press Enter Persistent CARP Maintenance Mode a second time, which subtracts the 240 it added — and confirm both nodes return to their intended roles.
Prevention
Make sure every interface that carries a CARP VIP passes protocol CARP and is not filtering the multicast group 224.0.0.18 — that is the path the election actually runs on. Separately, use a dedicated HA sync interface with its own VLAN and firewall rules that pass IP protocol pfsync (240) between the two sync addresses; pfsync has no port, so there is no port to open. Monitor CARP state changes per parent interface and alert when one VHID shows two MASTERs. Add “node isolation” checks to your change window so a misconfigured switch port cannot silently break the election.