OPNsense Forum

English Forums => General Discussion => Topic started by: lilor on January 04, 2025, 08:37:11 PM

Title: KEA DHCP - how to map subnets to specific interfaces?
Post by: lilor on January 04, 2025, 08:37:11 PM
This seems like one of those questions that I'm going to face-palm at the answer, but...

How do I map a specific DHCP subnet to a particular interface in KEA DHCP?
I want devices on the LAN to get IP addresses in x.x.1.0/24 and devices in the DMZ to get x.x.2.0/24 addresses.
In ISC DHCPv4 this is baked in, since the DHCP server settings are per-interface.

In KEA DHCP, I see how to configure the DHCP server to listen on DMZ and LAN interfaces, and I can define the subnets x.x.1.0/24 and x.x.2.0/24, but I don't see where to specify that x.x.1.0/24 is only for the LAN and x.x.2.0/24 is only for the DMZ. 

I've poked around in the config and read the documentation, but I don't see any option for this. Can someone hit me with a clue bat?
Title: Re: KEA DHCP - how to map subnets to specific interfaces?
Post by: Patrick M. Hausen on January 04, 2025, 08:49:25 PM
It will do that automatically matching the subnet configuration with the addresses configured on the interfaces.
Title: Re: KEA DHCP - how to map subnets to specific interfaces?
Post by: pfry on January 04, 2025, 10:25:28 PM
To expand on that a bit, the docs/setup guide(s) seem to be accurate, that is, in your case, use the networks ("x.x.1.0/24 and x.x.2.0/24") as the subnets, with an appropriate pool (within the subnet).