2020-08-01 11:38:41 +02:00
|
|
|
@startuml
|
|
|
|
|
2020-08-21 15:19:53 +02:00
|
|
|
title currentHost DHCPv4 (Kea 1.8.0)
|
2020-08-01 11:38:41 +02:00
|
|
|
|
|
|
|
agent "Subnet Selection" as entry
|
|
|
|
|
|
|
|
agent "Set subnet to the selected subnet" as setSelected
|
|
|
|
|
|
|
|
agent "Has client a lease for its client id?" as clientid_lookup
|
|
|
|
|
|
|
|
agent "Iterate on allowed subnets for client id" as clientid_iterate
|
|
|
|
|
|
|
|
agent "Set subnet to the by client id lease" as found_clientid
|
|
|
|
|
|
|
|
agent "Has client a matching lease?" as hwaddr_lookup
|
|
|
|
|
|
|
|
agent "Iterate on allowed subnets for hardware address" as hwaddr_iterate
|
|
|
|
|
|
|
|
agent "Set subnet to the matching lease" as found_hwaddr
|
|
|
|
|
|
|
|
agent "Has an address reservation?" as hasAddressReservation
|
|
|
|
|
|
|
|
agent "Set subnet to address reservation subnet" as setAddressReservation
|
|
|
|
|
2020-08-01 13:24:06 +02:00
|
|
|
agent "Is the address in an allowed pool?" as pool
|
|
|
|
|
|
|
|
agent "Iterate on allowed subnets with pool" as pool_iterate
|
|
|
|
|
|
|
|
agent "Set subnet to address pool subnet" as inAllowedPool
|
|
|
|
|
2020-08-01 13:37:30 +02:00
|
|
|
agent "Allocate a new lease" as allocate
|
|
|
|
|
|
|
|
agent "Iterate on allowed subnets" as allocate_iterate
|
|
|
|
|
|
|
|
agent "Set subnet to allocated lease subnet" as allocated
|
|
|
|
|
2020-08-01 11:38:41 +02:00
|
|
|
agent "Get subnet host reservation mode" as getHRmode
|
|
|
|
|
|
|
|
agent "Is subnet host reservation mode global?" as checkHRmode
|
|
|
|
|
|
|
|
agent "Get global host reservation" as global
|
|
|
|
|
|
|
|
agent "Get subnet host reservation" as bySubnet
|
|
|
|
|
|
|
|
agent "Return current host reservation" as return
|
|
|
|
|
|
|
|
entry --> setSelected
|
|
|
|
setSelected --> clientid_lookup
|
|
|
|
clientid_lookup ---> hwaddr_lookup : no client id option
|
|
|
|
clientid_lookup --> clientid_iterate
|
|
|
|
clientid_iterate -> clientid_iterate : match-client-id is false or no lease
|
|
|
|
clientid_iterate --> found_clientid : found a lease
|
|
|
|
found_clientid ----> hasAddressReservation
|
|
|
|
clientid_iterate --> hwaddr_lookup : not found by client id, try by hardware address
|
|
|
|
hwaddr_lookup ---> hasAddressReservation : no hardware address
|
|
|
|
hwaddr_lookup --> hwaddr_iterate
|
|
|
|
hwaddr_iterate -> hwaddr_iterate : no lease or client id mismatch
|
|
|
|
hwaddr_iterate --> found_hwaddr : found a lease
|
|
|
|
found_hwaddr ----> hasAddressReservation
|
|
|
|
hwaddr_iterate --> hasAddressReservation : not found
|
|
|
|
hasAddressReservation --> setAddressReservation : yes
|
2020-08-01 13:37:30 +02:00
|
|
|
hasAddressReservation --> pool : no or not check in the taken branch
|
2020-08-01 13:24:06 +02:00
|
|
|
setAddressReservation --> pool
|
|
|
|
pool --> pool_iterate
|
2020-08-01 13:37:30 +02:00
|
|
|
pool ---> allocate : pool check is not in all branches
|
2020-08-01 13:24:06 +02:00
|
|
|
pool_iterate -> pool_iterate : address not in an allowed pool
|
|
|
|
pool_iterate --> inAllowedPool : address in an allowed pool
|
2020-08-01 13:37:30 +02:00
|
|
|
pool_iterate ---> allocate : no allowed pool
|
|
|
|
inAllowedPool --> allocate
|
|
|
|
allocate --> allocate_iterate : start from preferred (last used) subnet
|
|
|
|
allocate ---> getHRmode : allocation is not in all branches
|
|
|
|
allocate_iterate -> allocate_iterate : no free address
|
|
|
|
allocate_iterate --> allocated : found a free address
|
|
|
|
allocated --> getHRmode
|
2020-08-01 11:38:41 +02:00
|
|
|
getHRmode --> checkHRmode
|
|
|
|
checkHRmode --> global : yes
|
|
|
|
checkHRmode --> bySubnet : no
|
|
|
|
global --> return : return global host reservation
|
|
|
|
bySubnet --> return : return subnet host reservation
|
|
|
|
|
2020-08-01 13:37:30 +02:00
|
|
|
footer Only the initial lookup is always performed: other occasions to change the subnet so the current host are only in some branches
|
|
|
|
|
2020-08-01 11:38:41 +02:00
|
|
|
@enduml
|