[Kea-users] Specifying a netmask different for listening and client assignment

Bruce Momjian bruce at momjian.us
Sat Aug 16 01:21:54 UTC 2025


With isc-dhcpd, I could easily specify a netmask for listening for dhcp
requests, e.g., /16, and supply a different netmask, /15, to be be sent
to clients once they register.  With isc-dhcpd I used:

          option subnet-mask 255.254.0.0;

However, with kea-dhcp4 2.2.0, the clients get the netmask of "subnet"
netmask and the "subnet-mask" doesn't seem to affect what clients get:

-->         "subnet": "182.20.0.0/16",

            "pools": [ { "pool": "182.20.17.1 - 182.20.17.254" } ],

            "option-data": [
                {
                    // For each IPv4 subnet you most likely need to specify at
                    // least one router.
                    "name": "routers",
                    // gateway.home
                    "data": "182.21.1.2"
                }
                {
                    // This is the netmask we give clients.
-->                 "name": "subnet-mask",
-->                 "data": "255.254.0.0" //  /15
                }
            ],

In the above configuration, clients get a netmask of /16;  I want them
to get /15.  If I change "subnet" to /15, clients get /15, but I only
want to listen in /16 addresses.

Is "subnet-mask" not expected to change the netmask sent to clients?  Am
I doing something wrong?  Is there another way to do this?  Is this
fixed in a later release?

This is on Debian 12 and I am about to upgrade to Debian 13.

-- 
  Bruce Momjian  <bruce at momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.


More information about the Kea-users mailing list