currentHost DHCPv4 (Kea 1.8.0)
Subnet Selection
Set subnet to the selected subnet
Has client a lease for its client id?
Iterate on allowed subnets for client id
Set subnet to the by client id lease
Has client a matching lease?
Iterate on allowed subnets for hardware address
Set subnet to the matching lease
Has an address reservation?
Set subnet to address reservation subnet
Is the address in an allowed pool?
Iterate on allowed subnets with pool
Set subnet to address pool subnet
Allocate a new lease
Iterate on allowed subnets
Set subnet to allocated lease subnet
Get subnet host reservation mode
Is subnet host reservation mode global?
Get global host reservation
Get subnet host reservation
Return current host reservation
no client id option
match-client-id is false or no lease
found a lease
not found by client id, try by hardware address
no hardware address
no lease or client id mismatch
found a lease
not found
yes
no or not check in the taken branch
pool check is not in all branches
address not in an allowed pool
address in an allowed pool
no allowed pool
start from preferred (last used) subnet
allocation is not in all branches
no free address
found a free address
yes
no
return global host reservation
return subnet host reservation
Only the initial lookup is always performed: other occasions to change the subnet so the current host are only in some branches