You save a reservation on a subnet: one IP, and a DUID, a client-id, or a MAC. On Discover, Lattice checks DUID first, then client-id, then MAC. A prefix-delegation client does not use a reservation. Saving the row does not write a lease.
A lease is a row in Postgres. Discover writes it as offered, and that offer lasts 30 seconds. The client’s Request commits the row as leased, for the subnet’s lease time. If that time is missing or zero, the grant is 24 hours. The row records which node wrote it.
On Discover, Lattice looks for an unexpired lease for that client before it looks at reservations. If one is still in force, that address is offered again. If not, and a reservation matches, the reserved IP is offered. If neither matches, the address comes from an enabled pool.
When a reservation or an assignment still covers an address, release or expiry does not return it to the pool. Inventory stays reserved, and the reservation is still there for the next Discover.
Another client does not get a reserved address from the pool. A request for that IP is refused while the reservation stands and the address is not free.
An assignment is a different row from a reservation. Use a reservation when the host takes its address from DHCP, and an assignment when it doesn’t. The pool hands out an address only when its inventory is free or already offered.
Windows DHCP also uses reservations and leases. Lattice keeps both kinds of row in one database.