PFSense - Carp, DHCP not handing out addresses

Hi All,

So i’ve been wanting to setup CARP Failover for a while with a companhy i maintain within the UK. I have followed the video guide written by Tom but cant seem to get it working, the system does not hand out DHCP but if a static address is entered it works.

I can confirm that the system syncs as i only setup all setting on the first and they instantly duplicated over where needed.

If I set a static ip fom a connected VM to either of the PF Boxes LAN ports they get a connection

Any Advise / would be very much appreciated.

My Hardware setup

I have a proxmox cluster constiting of 2 Dell R630 PVE Servers & a QDevice to keep quorum ( Again in know not recomended but this will be changing in the next 6 months to a quad cluster).

  • OS - Linux 6.5.11-8-pve (2024-01-30T12:27Z)
  • pve-manager/8.1.4/ec5affc9e41f1d79
  • 128GB ram
  • 2x 1tb sas ssd [raid 1 for redundency]
  • 6x 1.2Tb sas 10Krpm
  • 56 x Intel(R) Xeon(R) CPU E5-2660 v4 @ 2.00GHz (2 Sockets)

Each Dell R630 has a quad onboard GBe nic & a Quad GBe nic card in pcie slot 1 giving a total of 8 GBe.

(1 management, 3 issued to PFsense & 4 use for vairious VM on the system).

The onboard nic has been assigned to the management port & PFSense VM.
PFSENSE - 1 port WAN, 1 port LAN, 1 Port SYNC the setup has been duplicated through both machines in the cluster.

Starting from the begining here is my setup


ISP Virgin media Business - GRE Tunnel to Hitron Modem (Rather C**P but unfortionatly that what i have to work with)

They have a block of 5 static IP addresses 1 is assigned to the HiTron as the gateway leaving me 4 to play with.

— Uses for VM / Modem Gateway —

  • 8!.!!.!!.248 - GRE Tunnel via Virginmedia Business
  • 8!.!!.!!.249 - Hitron Gateway on modem

— Addresses usabele for LAN —

  • 8!.!!.!!.250 - First free address
  • 8!.!!.!!.251 - Second free address
  • 8!.!!.!!.252 - Third free address [PFSense - pveB]
  • 8!.!!.!!.253 - Forth free address [PFSense - pveA]

Proxmox has been setup to use port physical eno2, eno3, eno4 on both machines in cluster.
This has been configured with linux bridges. vmbr1, vmbr2, vmbr3 on both PFSense VM.

  • vmbr1 - SYNC
  • vmbr2 - WAN
  • vmbr3 - LAN

— SYNC —
pveA - vmbr1 - has been directly linked to pveB - vmbr1. for the sync line in PFSense.
— WAN —
pveA - vmbr2 - has been linked direct to HITron Modem & given address 8!.!!.!!.253
pveB - vmbr2 - has been linked direct to HiTron Modem & given address 8!.!!.!!.252
— LAN —
pveA - vmbr3 - has been pluged directly into a unmanages switch [for testing]
pveB - vmbr3 - has been pluged into the same switch [for testing]

PFSense Setup - PFA…IP.253

The first PFSense box has been set as master,

— interface setup —
SYNC eno2/vmbr1/vtnet2 - STATIC ip - 10.20.250.253/24
WAN eno3/vmbr2/vtnet0 - STATIC ip - 8!.!!.!!.253/29
LAN eno4/vmbr3/vtnet1 - STATIC ip - 10.20.10.253/24 [DHCP ENABLED]

— Rules —
Lan pass to all
Sync Pass to all

— Virtual IP Settings —
WAN CARP - 8!.!!.!!.251/29
LAN CARP - 10.20.10.254/24

— HA Settings —
interface - SYNC
config ip - 10.20.250.252/24
username - admin
password - password. [NOT ACTUAL PASSWORD]
all sync options toggled

— NAT Settings —
Outbound Hybrid
Mapping -

  • interface - WAN
  • Source - Network / alias - 10.20.10.0/24
  • translation address - 8!.!!.!!.251/29 [CARP ADDRESS WAN]

— DHCP Server Settings ----
Other DHCP Options

  • Gateway 10.20.10.254 [CARP LAN IP]
  • Failover IP - 10.20.10.252

PFSense Setup - PFB…IP.252

The second PFSense box has been set as backup,

— interface setup —
SYNC eno2/vmbr1/vtnet2 - STATIC ip - 10.20.250.252/24
WAN eno3/vmbr2/vtnet0 - STATIC ip - 8!.!!.!!.252/29
LAN eno4/vmbr3/vtnet1 - STATIC ip - 10.20.10.252/24 [DHCP ENABLED]

— Rules —
Lan pass to all
Sync Pass to all

— Virtual IP Settings —
WAN CARP - 8!.!!.!!.251/29
LAN CARP - 10.20.10.254

— NAT Settings —
Outbound Hybrid
Mapping -

  • interface - WAN
  • Source - Network / alias - 10.20.10.0/24
  • translation address - 8!.!!.!!.251/29 [CARP ADDRESS WAN]

— DHCP Server Settings ----
Other DHCP Options

  • Gateway 10.20.10.254 [CARP LAN IP]
  • Failover IP - 10.20.10.253

There is some good documentation on troubleshooting issues with DHCP HA. Give this a go and see if this helps.

https://docs.netgate.com/pfsense/en/latest/troubleshooting/ha-dhcp-failover.html

@xMAXIMUSx

Thank you for the fast reply, for some reason after i rebooted both the VPFSense boxes the Carp functions as. expected & hands out DHCP agan.

I do have a further queery, i run wireguard tunnels on the existing box… how would i be able to incorporate this into the CARP when i eventualy do the switch?.

To my knowledge pfsense does not support wireguard in HA. For now they do support OpenVPN in HA.

https://docs.netgate.com/pfsense/en/latest/vpn/openvpn/ha.html

@xMAXIMUSx

Once again, Thankyou for the help. My final queery for the day, If i were to add vlans to this setiup would i have to repeat the setup that i done on LAN on the VLANS?.

Yes, you would have to create VIP’s for each interface and configure DHCP properly with the failover address.

@xMAXIMUSx

Fantastic !! Tnakl you very much for your help !!!

1 Like

Back with the same issue… after duplicating the rules for all of my vlans, i have the same issue that no matter what Vlan i use the DHCP Server is not alloccating an address… i get unidentified 168.254.13.?

– Edit –
But bizarrely enough i get a dns of 10.20.??.254 where “??” being ehatever vlan im on …

So it seems all of my DHCP servers are in unknown-state

Did you make sure to configure your switch for all the new VLAN’s?

Hi @xMAXIMUSx,

at the moment there is no switch involved, its all vai Proxmox and a VM, The interfaces have been set to Vlan aware. The LAN interface issues DHCP ok, but the otrher vlans are in a unknown state on the DHCP leses page

If i adjust the Network config on the VM to Vlan 20 [or any other vlan i have setup] nothing happens i get an unknown link in windows [terst vm]

I can on ly sumis eits a config issue with PFSense, but for the life of me i cant figure out where

Did you tag the VM’s in Proxmox?

image

Hi @dkggpeters,

Yes dosent matter what VLAN i tag, i do not get a DHCP assignment. if i leave VLAN untagged i get a dhccp from the LAN address of the PFSense vms. Just any of my VLANS configured from PFSense seem to be in a unknown - state…

https://forums.lawrencesystems.com/uploads/default/original/2X/2/2cf59c1774443970acce82702d7c74ba33ffcb68.png

My Lan [ work s perfectly as expected ] Just the vlans, i have liuteraly duplicated the saetup for lan to say vlan 2o [ Adjusting where nesscacary for the vlan ], DHCP, NAT & Rules… no change

Right Now im at a loss, i have duplicated the config down to a T adjusting for the vlan numbers and nada all i get is unknown state for Vlans but normal state for the lan

Have you posted the problem on the Proxmox community?

I am running a 2 node cluster with PFSense on the 2nd node with no issues with dhcp for the vlans. I do use pci pass through for the wan and lan nic and virtual nics for the VM’s. I also do not do HA which complicates things.

Are you using kea DHCP?

Hi @xMAXIMUSx,
Apoligies hit a posting limit on my main account…

No im using ISC Dhcp.

Ive just redone my config from screatch on both machines just incase i screwed thing up… so my issue begins when i try to add VLANS to the CARP…

I setup a Virtual ip for. LAN, adjust NAT & DHCP, carp failover works like a charm.
I setup a Virtual ip for vlan[20] adjust NAT & DHCP carp failover fails, takes the LAN interface offline & the backup PFSense changes to master on the vlan. interface giving me 2 masters …

@dkggpeters,

Im trying to acheive automatic redundency for the company,

I was not questioning your reason for HA, just was wondering if it plays into the problem. Have you considered testing with a single PFSense install to take that variable out of the equation?