The goal of this document is to describe a proposed extension of the host reservation mechanism available in Kea 1.4. Its current limitation is the constraint to tie each host reservation to a given subnet. However, in some cases it makes sense to have a global reservation that would apply to many/all subnets (i.e. it would be used regardless of the place a device is attached to the network).
Proposed code changes
Currently it is possible to specify one of three reservation modes: disabled, out-of-pool and all. A fourth choice would be implemented, called global. When specified, it would cause Kea to look up the hosts database for global reservations rather than subnet-specific.
The global reservations would be designated by using subnet-id equal to 0.
This would allow:
Users to configure global HR for the whole network.
Users to configure different modes on different networks, if needed.
Global HRs to specify essentially any parameter possible in host reservations, in particular a hostname among other things.
Global HRs to specify a fixed-address, caveat being we do not validate it against known networks.
Allow network/subnet specific options to be sent, albeit based on the client's point of attachement (in other words, the subnet selection would continue to work exactly as it does in Kea 1.4)
In the initial implementation it would be possible, but discouraged to reserve addresses in global reservations. It would be possible, but Kea wouldn't verify whether the reserved address belong to the network the device is currently visiting. If misused, this could easily lead to clients getting broken configurations.
When using global reservation in a subnet, a subnet specific mechanism would be disabled. For example, if you have a subnet with subnet-id 1 and global reservations enabled, the hosts database would be queried for subnet-id 0. Reservations with subnet-id 1 would not be used.
If approved, implementation of this feature would take 10 working days. The untested code may become available sooner, but anyone interested in testing it early must acknowledge that this would be a software that didn't complete its testing cycle yet.
The following tasks are necessary to implement this feature:
HR parser, host-cmds, and backends must accept 0 as a subnet id
Servers need a mechanism to know to when to do a "global" search (HR_MODE == HR_GLOBAL)
AllocEngine::findReservation() - if the mode is HR_GLOBAL, then it does the same host-id lookup(s) now, but with subnet-id = 0