ISC DHCP secondary pool

Started by clarknova, November 04, 2024, 09:45:42 PM

Previous topic - Next topic
I have an OPNsense pair configured in HA. I have an existing subnet with a CARP IP and ISC DHCP server running:
Interface: opt14
CARP address: 10.13.4.1/24
VHID: 134
DHCP Range: 10.13.4.100 - 10.13.4.199


So far this works as expected and the DHCP server serves leases on the primary subnet.

I need to run a second DHCP pool on this same interface but a different subnet. I created a VIP on the new subnet using the same VHID as the CARP interface:
Interface: opt14
VIP: 172.31.0.254/24
VHID: 134


Then I added a secondary pool to the DHCP server on this interface:
Range: 172.31.0.16 - 172.31.0.32

As soon as I save the change, the DHCP service stops and the log shows:
Quotebad range, address 172.31.0.16 not in subnet 10.13.4.0 netmask 255.255.255.0

What am I doing wrong?
Is there a way to achieve what I'm trying to do?

What *are* you trying to do? Is it about additional capacity? Or something else?

AFAICT, DHCP for multiple subnets on a single interface is not supported.

I was trying to work with a host that was temporarily moved from another network. Re-IPing the host broke some ACLs so I was trying to preserve its IP address, and adding an interface to OPNsense wasn't an option. I was able to connect to the host and update the ACls to get things working.