1@startuml 2 3title DHCPv4 Assign Lease (Kea 1.8.0) 4 5agent "Check Subnet" as subnet 6note left : entry point 7 8agent "Get server id" as server_id 9 10agent "Get hint" as hint 11 12agent "Get hardware address and client id" as ident 13 14rectangle "INIT-REBOOT state" as init_reboot { 15 agent "Get existing lease by client id" as by_client_id 16 17 agent "Get existing lease by hardware address" as by_hw_addr 18 19 agent "Get authoritative" as authoritative 20} 21 22agent "Process hostname" as hostname 23 24agent "Request lease" as allocate 25 26rectangle "Lease allocated" as allocated { 27 agent "update DDNS" as ddns 28 agent "Send ACK" as ack 29} 30 31agent "No lease allocated" as failed 32note right : exit point 33 34agent "Send NAK" as nak 35note right : exit point 36 37agent "No response" as no_response 38note right : exit point 39 40subnet --> server_id 41subnet ---> nak : no subnet 42server_id --> hint 43hint --> ident : use requested address option 44hint --> ident : use client address 45hint --> ident : no hint 46ident --> init_reboot : requested address and no server id 47ident ---> hostname 48init_reboot --> by_client_id : has a client id 49init_reboot --> by_hw_addr : no client id 50by_client_id ---> authoritative : found 51by_client_id --> by_hw_addr : not found 52by_hw_addr --> authoritative 53authoritative ---> no_response : not authoritative and no owned lease 54authoritative --> nak : owned lease with hint mismatch 55authoritative --> nak : authoritative and no owned lease 56authoritative --> hostname : other cases 57hostname --> allocate 58allocate --> allocated : lease allocated 59allocated --> ddns 60ddns --> ack 61allocate --> failed : no lease allocated 62failed --> nak 63 64@enduml 65