Skip to main content

Kea Dhcp

@randybias/kea-dhcpv2026.10.17.1beta· 14d agoBEHAVIORSACCEPTED WARNINGS
01README

Install and configure an ISC Kea DHCPv4 server on one Linux host over SSH, with subnets, pools, host reservations and typed DHCP options. Every change is validated by Kea itself, written atomically and applied with config-set under an armed host-side revert that restores the previous configuration unless it is committed.

02Behaviors1
@randybias/kea-dhcpv2026.10.17.1kea_dhcp.ts
fn install()
DESTRUCTIVE. Install kea-dhcp4-server and socat (package state), capture the package's original config once, and leave the service disabled until the first apply. Idempotent.
fn render()
READ-ONLY. Render the kea-dhcp4.conf JSON for these inputs, its sha256 and the ordered apply plan. Deterministic; touches no host.
fn apply()
DESTRUCTIVE. Network service change: validate, snapshot, arm the host-side revert, write the config file and config-set the same JSON, then verify. Idempotent: an identical live config arms nothing. Not permanent until commit.
fn commit()
DESTRUCTIVE. Cancels the armed revert: gate on a passing verify, then take the revert lock, stop the host timer and clear the marker. Refuses when the revert already fired or its service started, the timer cannot be stopped, the revert record is missing, the live config drifted, or any verify check fails.
fn get()
READ-ONLY. Probe the recorded config and revert state plus the live server, then persist the observation.
fn sync()
READ-ONLY. Re-probe, adopt any fired revert into its record and report drift (file sha differs from the committed one). Never rewrites.
fn leases()
READ-ONLY. Query current DHCPv4 leases, optionally filtered by subnet, address or MAC, and persist them. Never writes a lease.
fn remove()
DESTRUCTIVE. Stop and disable the server and converge it back to the package's original config under the armed-revert protocol; call commit to make the removal permanent. Idempotent.

Resources

config(infinite)— Rendered config sha256, Kea's own hash and timestamps
pending(infinite)— The uncommitted apply: sha, Kea hash and status
revert(infinite)— One armed revert: token, window and armed hash
observation(infinite)— Last get/sync probe of the server
leases(7d)— Last read-only lease query
render(infinite)— Last rendered config, sha256, warnings and plan
action(infinite)— Last outcome of each action method
03Stats
A
93 / 100
Downloads
2
Archive size
64.1 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License1/2partial

    no SPDX license declared

  • Verified public repository2/2earned

05Platforms
06Labels