DHCP options

Option code plus JSON payload on the subnet, or on a client class. Optional vendor.

On /subnets/{id}, DHCP options:

  1. Code (e.g. 6 for DNS servers).
  2. Payload JSON.
  3. Optional vendor class.

Payload shapes dhcpd understands:

{"addresses":["8.8.8.8","1.1.1.1"]}
{"ip":"10.20.20.1"}
{"string":"office.example.com"}
{"uint32":86400}
{"hex":"0102"}

Code 6 with addresses becomes option 6 (DNS). Code 42 with addresses is NTP — the subnet NTP servers field also sets option 42; a stored option wins if both exist. NTP.

Mask, router, and lease-time are built-in from the subnet row. Set Gateway on the subnet so IPAM and DHCP agree. PXE is not a JSON option: use the subnet PXE next-server / PXE boot file fields (PXE).

Priority (later wins): global < subnet < pool < class < reservation.

An unscoped operator cannot write options. A scoped operator can write an allowed option where a grant covers that subnet, pool, or reservation. Global options and client classes stay visible and stay with the admin. Inherited rows, including class rows, are not editable from the grant.

Scoped writers are refused on codes 1, 51, 53, 54, 58, and 59 at every scope, and on code 3 at subnet scope. Code 3 on a pool or a reservation is allowed. Admin can still write those codes. A duplicate code at the same scope is 409. A pool grant does not change the subnet-wide router or the lease time.

A reservation option is on the Offer for that client. A dynamic client in the same pool does not receive it. A pool option does not leak to the sibling pool. A class option still beats a pool option.

Class-scoped options: Client classes. Who can write which row: Who can change a subnet. Wrong JSON fails the save. There is no dhcpd.conf snippet to edit on each node.