- DNS updates from the DHCP server (RFC 2136): Kea’s DHCP-DDNS and ISC dhcpd sign them with an update key; Windows DHCP sends them unsigned. The name changes the moment a lease does, and DNZ holds these updates to the DHCID rules of RFC 4701/4703.
- DNZ reads the leases: Kea through its control agent’s API, ISC dhcpd and Windows DHCP from a lease file that is pushed to DNZ, uploaded, or fetched from a URL. A, AAAA and PTR records then follow the leases, and leases that end lose their records.
Which names leases get
A live lease (active, not run out) with a hostname gets:- an A record (IPv4) or AAAA record (IPv6) in the division’s zone the name falls in. A
hostname with a domain in one of the zones (
pc1.lan.example.com, as Kea and Windows send it) is used as it is; a bare hostname (pc1), or one in a domain DNZ has no zone for (ws01.corp.local), gets its first label in the server’s domain:pc1.lan.example.com. - a PTR record in the reverse zone, when the division has one (
0.10.in-addr.arpafor10.0.x.x, anip6.arpazone for IPv6). PTRs can be turned off per server.
Connect a DHCP server
DNS → DHCP & IPAM → Add DHCP server, then the Setup guide on its card has every block below filled in for your server, with copy buttons.- Kea
- ISC dhcpd
- Windows DHCP
DNZ reads Kea through the control agent (DNZ reads it every 60 seconds, and at once on Sync now. Delegated prefixes (IA_PD) are left
out; reservations without a lease show in IPAM as reserved.Kea’s DHCP-DDNS (D2) updates DNS the moment a lease changes. Make an update key with and in
kea-ctrl-agent), or from Kea 3.0 the DHCP
server’s own HTTP control socket. It asks for config-get (subnets, pools, reservations) and
lease4-get-all / lease6-get-all, which need the lease_cmds hook. It never changes Kea’s
configuration.In kea-dhcp4.conf (the hook’s path depends on the package):kea-ctrl-agent.conf, with a password you give DNZ too:A,
AAAA, PTR and DHCID for the forward and reverse zones, then in kea-dhcp-ddns.conf (D2
wants DNZ’s DNS address as an IP):kea-dhcp4.conf:The DHCID rules
A DHCID record is a hash of the client’s identity; DHCP servers keep one at every name they register (RFC 4701), so a name stays with the client that has it. Kea checks this itself (check-with-dhcid, RFC 4703): it adds a name only while it is free, changes or removes it only
while the DHCID is its client’s, and on release removes the address, then the DHCID.
DNZ holds every DNS UPDATE that carries a DHCID, and every unsigned update from a DHCP server, to
the same rules on its own side, whatever the client’s conflict resolution mode:
- a name with static records (A, AAAA, PTR, CNAME or DHCID no DHCP update or lease made) is never changed: the update gets YXDOMAIN;
- an update with a DHCID never changes a name whose DHCID is another client’s (YXDOMAIN).
no-check-with-dhcid still can’t take another client’s name, or yours. To let clients take
names over, use no-check-without-dhcid: Kea then sends ordinary DNS UPDATEs, limited only by the
key’s scope.
IPAM
DNS → DHCP & IPAM → IPAM puts together, per division:- Subnets: the DHCP servers’ (Kea’s subnets and shared networks, Windows scopes), the division’s client networks, and ones added by hand. The same CIDR from several places is one subnet.
- Addresses: every lease and reservation, A/AAAA record and PTR, with its hostname, MAC, source and when the client was last seen. An address counts as used while it has a live lease, a reservation, or a record.
- Use and free ranges: per subnet and pool; an IPv4 network loses its network and broadcast address. Any network can be opened, known or not.
- Conflicts: two names on one address, a static record on an address leased to another machine, a static record inside a DHCP pool, a PTR to a local name without that address, and leases whose name is taken.
dnz_dhcp_leases, dnz_dhcp_records_synced_total,
dnz_dhcp_read_success, dnz_ipam_conflicts and more.
See also: dnz dhcp and dnz ipam, DHCP and IPAM API.