For anyone coming back to this page looking for a solution, I ran into the same issue described earlier in this thread — broadcast storms and unstable WAN connectivity when both OPNsense firewalls were connected in HA mode with CARP enabled (only on LAN).
A tcpdump on the WAN interfaces showed leakage from the LAN and other VLANs — anything from Dropbox's discovery protocol (on the LAN side) to random broadcasts from IoT devices on separate VLANs LAN Side could unexpectedly trigger a broadcast storm on the WAN side.
After lots of frustration, trial and error, here's what worked for me:
I created two dedicated, isolated VLANs on my UniFi US-24 switch(but this should work on any L2-managed switch) — one for each WAN connection.
WAN 1:
• VLAN 50: "WAN1-Isolated"
• Port 1: Modem 1 (access port on VLAN 50)
• Port 3: OPNsense A WAN interface (access port on VLAN 50)
• Port 5: OPNsense B WAN interface (access port on VLAN 50)
WAN 2:
• VLAN 60: "WAN2-Isolated"
• Port 2: Modem 2 (access port on VLAN 60)
• Port 4: OPNsense A WAN interface (access port on VLAN 60)
• Port 6: OPNsense B WAN interface (access port on VLAN 60)
These ports are not trunked, not included in any other VLAN, and have no uplink or routing beyond themselves.
On the switch, I enabled the following:
• Storm Control: Limited Unicast, Multicast, and Broadcast to 100 packets/sec
• Loop Protection: Enabled on ports 1-6 in my case
This setup effectively creates a "virtual dumb switch" using VLANs — but with better control and built-in protection.
Broadcasts and CARP advertisements are confined within each isolated VLAN, and controlled by the switch.
Again in my case, using a physical "dumb" switch between the modem and firewalls did not solve the issue — likely for the same reason it occurred in the first place when both firewalls were connected directly to the modems themselves (through the inbuilt "dumb" switch).
Since switching to this VLAN-based approach, the system has been stable — no broadcast storms in the last 4 days. Fingers crossed it stays that way!
A note on Virtualised setups.
If running on proxmox, it is imperative to set the machine type to Q35, and set the VIOMMU to INTEL (not default (NONE)). I found that as soon as I changed this setting, the problem returned even with the setup above. I have yet to test if I can do away with the switch completely now, and connect directly to the dumb switches on the modem. Also the WAN cards on opnsense are connected in PCI (direct mode) and removed completely from the host network options.
A tcpdump on the WAN interfaces showed leakage from the LAN and other VLANs — anything from Dropbox's discovery protocol (on the LAN side) to random broadcasts from IoT devices on separate VLANs LAN Side could unexpectedly trigger a broadcast storm on the WAN side.
After lots of frustration, trial and error, here's what worked for me:
I created two dedicated, isolated VLANs on my UniFi US-24 switch(but this should work on any L2-managed switch) — one for each WAN connection.
WAN 1:
• VLAN 50: "WAN1-Isolated"
• Port 1: Modem 1 (access port on VLAN 50)
• Port 3: OPNsense A WAN interface (access port on VLAN 50)
• Port 5: OPNsense B WAN interface (access port on VLAN 50)
WAN 2:
• VLAN 60: "WAN2-Isolated"
• Port 2: Modem 2 (access port on VLAN 60)
• Port 4: OPNsense A WAN interface (access port on VLAN 60)
• Port 6: OPNsense B WAN interface (access port on VLAN 60)
These ports are not trunked, not included in any other VLAN, and have no uplink or routing beyond themselves.
On the switch, I enabled the following:
• Storm Control: Limited Unicast, Multicast, and Broadcast to 100 packets/sec
• Loop Protection: Enabled on ports 1-6 in my case
This setup effectively creates a "virtual dumb switch" using VLANs — but with better control and built-in protection.
Broadcasts and CARP advertisements are confined within each isolated VLAN, and controlled by the switch.
Again in my case, using a physical "dumb" switch between the modem and firewalls did not solve the issue — likely for the same reason it occurred in the first place when both firewalls were connected directly to the modems themselves (through the inbuilt "dumb" switch).
Since switching to this VLAN-based approach, the system has been stable — no broadcast storms in the last 4 days. Fingers crossed it stays that way!
A note on Virtualised setups.
If running on proxmox, it is imperative to set the machine type to Q35, and set the VIOMMU to INTEL (not default (NONE)). I found that as soon as I changed this setting, the problem returned even with the setup above. I have yet to test if I can do away with the switch completely now, and connect directly to the dumb switches on the modem. Also the WAN cards on opnsense are connected in PCI (direct mode) and removed completely from the host network options.