OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: zbig on January 19, 2023, 12:04:05 am

Title: DHCP service "Additional Pools" logic
Post by: zbig on January 19, 2023, 12:04:05 am
Hello

I have a case where a couple of clients from my network have to get assigned some non-default DNS servers but I don't want to setup a separate (V)LAN for them. Figured that would be a perfect use case for DHCP server's "Additional Pools" given how it allows me to carve out a separate pool from the network and configure pretty much everything the "main" pool allows. As there doesn't seem to be a separate "DHCP Static Mappings" section for additional pools, I reckoned I'll just make a regular ("top-level") DHCP mapping, assign an IP from my additional pool there, leave the "DNS servers" fields empty and this way it would fetch proper DNS IP's from the additional pool's configuration. This turned out not to be the case: the clients in question got assigned the default, system-wide DNS address.

Am I doing something wrong here? If the "main/additional" DHCP pool configurations are not being resolved hierarchically the way I was expecting them to and the additional pools don't offer their own DHCP reservation UI, what is the practical use case for having them in the first place?

Cheers,
Zbig
Title: Re: DHCP service "Additional Pools" logic
Post by: va176thunderbolt on January 22, 2023, 02:43:12 pm
The "Additional Pools" are for pools within the subnet of the interface:

"If you need additional pools of addresses inside of this subnet outside the above Range"

I have some legacy subnets where the ip's were not managed well, and have statics all of the place. I setup one small subnet, then added a copy of other pools in between the statics.

I think you'll have to setup a vlan to service dhcp out of the new subnet
Title: Re: DHCP service "Additional Pools" logic
Post by: FurryFennec on January 23, 2023, 08:20:48 pm
As you've found, leaving DNS servers blank in a scope will just "push" the interface IP to the clients as their DNS server. I believe you could use the DHCP reservations feature for those couple clients and assign those non-standard  DNS servers specifically to those reservations.