22.5. Providing DHCP with Kea
The ISC DHCP server (isc-dhcp-server) has finished its upstream
life: ISC ended development at 4.4.3-P1, and Debian 13 still packages
that final release, with every isc-dhcp-* package flagged
deprecated. Its successor is Kea, the same organization's
reimplementation with a JSON configuration, a control socket, and
hook-based extensibility. The client side stays familiar:
isc-dhcp-client still ships dhclient in Debian 13 (flagged as
deprecated but fully functional, and the tool used throughout this
chapter), and NetworkManager carries its own client. The server
choice, once again, is worth a table:
| Criterion | Kea | dnsmasq | isc-dhcp-server |
|---|---|---|---|
| Status in Debian 13 | current, actively maintained | maintained | still packaged, deprecated (EOL upstream) |
| Configuration | JSON, validated by a -t test run |
one small flat file | flat file with a custom syntax |
| Lease storage | memory file (default), MySQL, or PostgreSQL | file | file |
| Redundancy | HA hook with lease synchronization (Section 22.6.2) | none built in | failover protocol, peer-specific |
| Dynamic DNS | built-in kea-dhcp-ddns service with TSIG |
optional, script-driven | native, TSIG-authenticated updates |
| IPv6, including prefix delegation | DHCPv6 and IA_PD in the same daemon | DHCPv6 only | DHCPv6 in a separate daemon |
| Best fit | the general server case from one subnet to HA pairs | small networks where DNS+DHCP in one process is a feature | none - do not start new deployments on it |
Kea is the only option with native lease synchronization between peers, which is why the redundant design of Section 22.6 builds on it. dnsmasq remains a good small-office choice when one box doing everything is the goal rather than a compromise.
22.5.1. Installing DHCPv4 Service and Selecting Interfaces
Install all three Kea components on ns1 - as root:
# apt install kea-dhcp4-server kea-dhcp6-server kea-dhcp-ddns-server
Three packages, three services: kea-dhcp4-server answers DHCPv4,
kea-dhcp6-server answers DHCPv6 (Section 22.7), and
kea-dhcp-ddns-server is the update relay between leases and DNS
(Section 22.6.3). They share configuration under /etc/kea, run as
the unprivileged _kea user, keep leases under /var/lib/kea, and
expose runtime control through sockets under /run/kea. The HA and
lease-command hook libraries the last sections load ship inside
kea-common, which arrives as a dependency - nothing extra to
install for them.
The package's own /etc/kea/kea-dhcp4.conf ships as a heavily
commented example whose interfaces list is empty - a server that
listens on nothing - so the first task is replacing it wholesale
with a configuration that serves the LAN. The complete
/etc/kea/kea-dhcp4.conf on ns1:
# /etc/kea/kea-dhcp4.conf - DHCPv4 primary for both LANs
{
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"eth1"
]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/run/kea/kea4-ctrl-socket"
},
"lease-database": {
"type": "memfile",
"persist": true,
"name": "kea-leases4.csv",
"lfc-interval": 300
},
"valid-lifetime": 600,
"renew-timer": 300,
"rebind-timer": 480,
"subnet4": [
{
"id": 1,
"subnet": "192.168.232.0/24",
"interface": "eth1",
"pools": [
{
"pool": "192.168.232.100 - 192.168.232.150"
}
],
"option-data": [
{
"name": "routers",
"data": "192.168.232.10"
},
{
"name": "domain-name-servers",
"data": "192.168.232.53, 192.168.232.54"
},
{
"name": "domain-name",
"data": "handbook.test"
}
],
"reservations": [
{
"hw-address": "52:54:00:22:00:01",
"ip-address": "192.168.232.120",
"hostname": "printer"
}
]
},
{
"id": 2,
"subnet": "192.168.233.0/24",
"pools": [
{
"pool": "192.168.233.100 - 192.168.233.150"
}
],
"option-data": [
{
"name": "routers",
"data": "192.168.233.2"
},
{
"name": "domain-name-servers",
"data": "192.168.232.53"
},
{
"name": "domain-name",
"data": "handbook.test"
}
]
}
],
"hooks-libraries": [
{
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
},
{
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [
{
"this-server-name": "ns1",
"mode": "hot-standby",
"heartbeat-delay": 1000,
"max-response-delay": 5000,
"max-ack-delay": 5000,
"max-unacked-clients": 0,
"peers": [
{
"name": "ns1",
"url": "http://192.168.232.10:8000/",
"role": "primary",
"auto-failover": true
},
{
"name": "ns2",
"url": "http://192.168.232.11:8000/",
"role": "standby",
"auto-failover": true
}
]
}
]
}
}
],
"dhcp-ddns": {
"enable-updates": true,
"server-ip": "127.0.0.1",
"server-port": 53001,
"sender-ip": "192.168.232.10",
"sender-port": 0,
"max-queue-size": 1024,
"ncr-protocol": "UDP",
"ncr-format": "JSON"
},
"ddns-send-updates": true,
"ddns-override-no-update": true,
"ddns-override-client-update": true,
"ddns-replace-client-name": "never",
"ddns-generated-prefix": "dhcp",
"ddns-qualifying-suffix": "handbook.test.",
"ddns-update-on-renew": true,
"ddns-conflict-resolution-mode": "check-with-dhcid",
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "/var/log/kea/kea-dhcp4.log",
"pattern": "%d %-5p %m\n"
}
],
"severity": "INFO",
"debuglevel": 0
}
]
}
}
The blocks, in order:
interfaces-configselectseth1and nothing else. DHCPv4 is broadcast, so Kea opens raw sockets on the named interface and receives everything on that link; naming interfaces explicitly is how the server avoids answering on the management network.control-socketopens/run/kea/kea4-ctrl-socket, the JSON command channel Section 22.6.2 uses.lease-databasepicks the defaultmemfilebackend - a CSV file under/var/lib/kea, persisted, compacted on thelfc-interval(Section 22.5.3).- The three top-level timers set every lease this server grants: 600 s valid, renewal at 300 s, rebind at 480 s - the values Figure 22.3 drew.
subnet4holds the two subnets; Section 22.5.2 walks them.hooks-librariesloads two hook libraries: the lease command hook, which adds thelease4-get-allcommand the control socket serves, and the high-availability hook, whose stanza names this host (ns1, the primary) and its peer - Section 22.6.2's subject, present from the start so the file never changes shape later. Until ns2 runs its own Kea service in that section, the hook simply reports the missing partner in its log and this server answers alone - the state machine there explains both behaviors.- The
dhcp-ddnsblock and theddns-*parameters make Kea a client of the update service: on every lease grant or release it sends a name change request to127.0.0.1:53001, where the DDNS service listens - its configuration comes right after this one, and Section 22.6.3 demonstrates the chain they feed. loggerswrites informational messages to/var/log/kea/kea-dhcp4.logwith timestamps.
Validate the configuration exactly the way the service itself
will read it - as john, with the _kea user's own test run:
$ sudo -u _kea /usr/sbin/kea-dhcp4 -t /etc/kea/kea-dhcp4.conf
2026-11-22 11:15:03.841 INFO [kea-dhcp4.hosts/25583.140174115305408] HOSTS_BACKENDS_REGISTERED the following host backend types are available: mysql postgresql
2026-11-22 11:15:03.841 WARN [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled.
2026-11-22 11:15:03.841 WARN [kea-dhcp4.dhcp4/25583.140174115305408] DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
2026-11-22 11:15:03.842 INFO [kea-dhcp4.hooks/25583.140174115305408] HOOKS_LIBRARY_CLOSED hooks library /usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so successfully closed
2026-11-22 11:15:03.843 INFO [kea-dhcp4.hooks/25583.140174115305408] HOOKS_LIBRARY_CLOSED hooks library /usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so successfully closed
2026-11-22 11:15:03.843 INFO [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 192.168.232.0/24 with params: t1=300, t2=480, valid-lifetime=600
2026-11-22 11:15:03.844 INFO [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 192.168.233.0/24 with params: t1=300, t2=480, valid-lifetime=600
2026-11-22 11:15:03.844 INFO [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_CFGMGR_SOCKET_TYPE_SELECT using socket type raw
2026-11-22 11:15:03.844 INFO [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth1
2026-11-22 11:15:03.844 INFO [kea-dhcp4.dhcpsrv/25583.140174115305408] DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "dhcp-socket-type" not specified , using default socket type raw
The -t switch runs the full configuration path and exits instead
of serving - every line above is what the real startup will log.
The two warnings are informational; the lines that matter are the
two subnet declarations with their timers, and
DHCPSRV_CFGMGR_ADD_IFACE listening on interface eth1 - the
interface selection confirmed. The two HOOKS_LIBRARY_CLOSED
lines are the same two hooks from the listing closing down after
a successful test parse, which is the -t run's way of saying
both loaded.
Start the service - as root on ns1:
# systemctl restart kea-dhcp4-server
The restart is silent; the confirmation that the service is
actually serving is the client exchange in the next subsection, in
the same way Section 22.2.1 trusted unbound-checkconf over a
restart message. systemctl enable kea-dhcp4-server (also silent)
makes the service start at boot.
The third Kea component needs its own configuration before it can
run: the update relay that turns lease changes into DNS records.
Write /etc/kea/kea-dhcp-ddns.conf on ns1:
# /etc/kea/kea-dhcp-ddns.conf - the lease-to-DNS update service
{
"DhcpDdns": {
"ip-address": "127.0.0.1",
"port": 53001,
"dns-server-timeout": 2000,
"ncr-protocol": "UDP",
"ncr-format": "JSON",
"control-socket": {
"socket-type": "unix",
"socket-name": "/run/kea/kea-ddns-ctrl-socket"
},
"tsig-keys": [
{
"name": "ddns-key",
"algorithm": "hmac-sha256",
"secret": "Y2hhcHRlcjIyLWRkbnMta2V5LTAwMDEtYWJjZGVm"
}
],
"forward-ddns": {
"ddns-domains": [
{
"name": "handbook.test.",
"key-name": "ddns-key",
"dns-servers": [ { "ip-address": "192.168.232.10", "port": 53 } ]
}
]
},
"reverse-ddns": {
"ddns-domains": [
{
"name": "232.168.192.in-addr.arpa.",
"key-name": "ddns-key",
"dns-servers": [ { "ip-address": "192.168.232.10", "port": 53 } ]
},
{
"name": "233.168.192.in-addr.arpa.",
"key-name": "ddns-key",
"dns-servers": [ { "ip-address": "192.168.232.10", "port": 53 } ]
}
]
},
"loggers": [
{
"name": "kea-dhcp-ddns",
"output_options": [
{ "output": "/var/log/kea/kea-dhcp-ddns.log", "pattern": "%d %-5p %m\n" }
],
"severity": "INFO",
"debuglevel": 0
}
]
}
}
This is the receiving end of the dhcp-ddns block above: the
service listens on 127.0.0.1:53001, holds the same TSIG secret
as /etc/bind/keys.conf carries for ddns-key, and routes
forward updates to the handbook.test. zone plus reverse updates
to both IPv4 reverse zones - signing every request with the key
before sending it to BIND. Start it - still as root on ns1:
# systemctl restart kea-dhcp-ddns-server
Silent, like every service start in this chapter. With both Kea services running, every lease that carries a hostname produces its DNS records; Section 22.6.3 walks the whole chain, and the client exchanges before that simply make use of it. (ns2 receives an identical copy of this file when its Kea service arrives in Section 22.6.2.)
22.5.2. Subnets, Pools, Reservations, Routers, and DNS Options
The two subnet4 entries in the listing answer different
questions, and the difference is the subsection's subject. Subnet 1,
the primary LAN, is bound to eth1 - clients broadcast on that
link, and Kea picks the subnet from the receiving interface. Its
pool grants addresses from .100 to .150, its options hand
clients the gateway (192.168.232.10, ns1's LAN address - on a
real network this option names the subnet's actual router), both
resolvers, and the handbook.test search domain,
and its one reservation pins the printer's link address
52:54:00:22:00:01 to 192.168.232.120 with the hostname
printer. Subnet 2, the relay network, has no interface at all -
it is selected by the relay address inside forwarded requests, the
mechanism Section 22.5.4 exercises. The options themselves:
| DHCP option | Name in Kea | Contents here | Effect on the client |
|---|---|---|---|
| 3 | routers |
the subnet's gateway | installed as the default route |
| 6 | domain-name-servers |
resolver addresses, comma-separated | written into the client's resolver configuration |
| 15 | domain-name |
handbook.test |
the client's DNS search domain |
Watch all three arrive on a real client. lanclient begins with a
static address on eth1 from the network build - remove it so the
interface starts clean, as john:
$ sudo ip addr del 192.168.232.60/24 dev eth1
Nothing prints; the address is gone. dhclient's useful forms for
the rest of the chapter:
| Invocation | Description |
|---|---|
dhclient -1 [-v] iface |
obtain one IPv4 lease, then keep managing it in the background; -v narrates the exchange to the terminal |
dhclient -r iface |
release the lease and exit |
dhclient -6 -1 [-v] iface |
obtain an IPv6 address lease (Section 22.7.2) |
dhclient -6 -P -1 [-v] iface |
request a delegated IPv6 prefix (Section 22.7.4) |
Verbose messages go to the terminal merged with any errors. Run the exchange - on lanclient, as john:
$ sudo dhclient -1 -v eth1
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/52:54:00:64:7a:37
Sending on LPF/eth1/52:54:00:64:7a:37
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPOFFER of 192.168.232.100 from 192.168.232.10
DHCPREQUEST for 192.168.232.100 on eth1 to 255.255.255.255 port 67
DHCPACK of 192.168.232.100 from 192.168.232.10
bound to 192.168.232.100 -- renewal in 227 seconds.
The full four-message exchange of Figure 22.3, narrated by the
client: DISCOVER broadcast, OFFER of .100 from ns1, REQUEST
claiming that offer, ACK committing it, and bound to
192.168.232.100 with renewal due in 227 seconds - that is the
renew timer (300 s) minus the seconds the exchange already took.
(The version banner identifies the ISC client, 4.4.3-P1.) Verify
what landed on the interface and in the resolver configuration:
$ ip -4 -br addr show eth1
eth1 UP 192.168.232.100/24
$ grep -E "nameserver|search|domain" /etc/resolv.conf
domain handbook.test
search handbook.test
nameserver 192.168.232.53
nameserver 192.168.232.54
Both resolver addresses and the search domain from options 6 and
15, written by the lease. Chapter 17
covers what a desktop client does with the same information; this
host simply wrote /etc/resolv.conf.
The reservation needs a client with the reserved link address.
Rather than a second machine, give lanclient a second, independent
client identity: a macvlan interface is a virtual link with its
own MAC address on the same physical network, so the DHCP server
sees a brand-new client. In a root shell on lanclient:
# ip link add link eth1 name mv1 address 52:54:00:22:00:01 type macvlan mode bridge
Silent - the link exists. Bring it up:
# ip link set mv1 up
Also silent. Now ask for a lease on mv1, as john:
$ sudo dhclient -1 -v mv1
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/mv1/52:54:00:22:00:01
Sending on LPF/mv1/52:54:00:22:00:01
Sending on Socket/fallback
DHCPDISCOVER on mv1 to 255.255.255.255 port 67 interval 7
DHCPOFFER of 192.168.232.120 from 192.168.232.10
DHCPREQUEST for 192.168.232.120 on mv1 to 255.255.255.255 port 67
DHCPACK of 192.168.232.120 from 192.168.232.10
bound to 192.168.232.120 -- renewal in 297 seconds.
The server offered .120 - not the pool's next free address -
because the reservation matched the link address 52:54:00:22:00:01
before the pool was consulted. The hostname the reservation carries
reaches DNS through the update service started earlier: the record
printer.handbook.test now exists, created by the same
lease-to-record chain that Section 22.6.3 demonstrates end to end.
$ dig @192.168.232.10 printer.handbook.test A +short
192.168.232.120
The reserved address answers under the reserved name. The macvlan
link is disposable test infrastructure - when the reservation is
verified, remove it in the root shell with ip link del mv1, and
with it the second client identity.
22.5.3. Lease Storage, Configuration Validation, and Service Logs
Every lease the server grants is a row in its database. The default
memfile backend writes a CSV under /var/lib/kea - the
reservation's row, as root on ns1:
# grep '192.168.232.120' /var/lib/kea/kea-leases4.csv | tail -2
192.168.232.120,52:54:00:22:00:01,,600,1795346737,1,1,1,printer.handbook.test,0,,0
192.168.232.120,52:54:00:22:00:01,,600,1795346737,1,1,1,printer.handbook.test,0,,0
Two identical rows because the lease was granted and then renewed,
each event rewriting the record: address, link address, an empty
client identifier, the 600 s lifetime, the expiry as a Unix epoch,
the subnet id, the two DDNS flags (forward and reverse updates were
performed), the hostname, and the state. The file is plain text -
greppable, diffable, and backed up like any other, and it is the
authoritative record of who holds what. The lfc-interval from the
configuration triggers periodic lease file cleanup, a rewrite that
drops expired history so the CSV does not grow forever.
The -t validation shown in Section 22.5.1 is worth one more
deliberate pass, because its failure mode is exactly as
informative as its success. Keep a broken configuration as
/etc/kea/kea-dhcp4-bad.conf on ns1:
# /etc/kea/kea-dhcp4-bad.conf - a pool whose range runs backward
{
"Dhcp4": {
"interfaces-config": { "interfaces": [ "eth1" ] },
"subnet4": [
{
"id": 1,
"subnet": "192.168.232.0/24",
"pools": [ { "pool": "192.168.232.100 - 192.168.232.50" } ]
}
]
}
}
The pool's start address is above its end address. Check it as before - as john:
$ sudo -u _kea /usr/sbin/kea-dhcp4 -t /etc/kea/kea-dhcp4-bad.conf
2026-11-22 11:15:05.937 INFO [kea-dhcp4.hosts/25606.139929839736768] HOSTS_BACKENDS_REGISTERED the following host backend types are available: mysql postgresql
2026-11-22 11:15:05.937 WARN [kea-dhcp4.dhcpsrv/25606.139929839736768] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled.
2026-11-22 11:15:05.938 WARN [kea-dhcp4.dhcp4/25606.139929839736768] DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
2026-11-22 11:15:05.938 ERROR [kea-dhcp4.dhcp4/25606.139929839736768] DHCP4_PARSER_FAIL failed to create or run parser for configuration element subnet4: Failed to create pool defined by: 192.168.232.100-192.168.232.50 (/etc/kea/kea-dhcp4-bad.conf:8:30)
Error encountered: Failed to create pool defined by: 192.168.232.100-192.168.232.50 (/etc/kea/kea-dhcp4-bad.conf:8:30)
Kea parsed the JSON, accepted the structure, and rejected the
semantics - with the file, line, and column of the offending range.
The command exits nonzero, which is what makes it a gate: a
configuration that fails -t never reaches systemctl restart.
The same test run works for kea-dhcp6 and the DDNS service.
The loggers block from Section 22.5.1's listing is the third
operational tool: every packet the server handles is an INFO line
in /var/log/kea/kea-dhcp4.log. The section's captures quote that
log twice - the relay exchange in Section 22.5.4 and the allocation
failure in Section 22.8.3 - and its lines follow one pattern:
message ID, client link address, transaction id, then the event.
Between the lease CSV and this log, a Kea server keeps a complete
audit of its own decisions.
22.5.4. DHCP Relay and Routed Client Networks
DHCPv4 is broadcast, and broadcasts stop at the first router -
which is a problem for the remote LAN, whose clients have no server
of their own. The DHCP relay agent is the standard answer: a
process on the router that listens for client broadcasts, wraps
them in a unicast packet to the real server, and stamps the packet
with the address of the client-facing interface (the gateway
address, giaddr). The server sees giaddr, uses it to select
the right subnet, and sends its answer back to the relay, which
delivers it on the client's link.
The relay host needs two things beyond the service itself: IPv4
forwarding, so it routes between the LANs (Chapter 19
shows the persistent configuration; the practice host enabled it
with sysctl -w net.ipv4.ip_forward=1), and a return route on
every server-side host, so answers to the remote subnet find their
way back through the relay rather than the missing direct path.
On ns1, ns2, and resolver, in a root shell:
# ip route replace 192.168.233.0/24 via 192.168.232.12
Silent on each host - the route points at the relay's LAN-side address. Now the relay: install and configure it on dhcprelay - as root:
# apt install isc-dhcp-relay
The package asks two debconf questions - the servers to forward
to, and the interfaces to listen on - and stores the answers in
/etc/default/isc-dhcp-relay. Write that file directly:
# /etc/default/isc-dhcp-relay - forward the remote LAN's DHCP to the real servers
SERVERS="192.168.232.10 192.168.232.11"
INTERFACES=""
OPTIONS="-4 -id eth1 -iu eth2"
SERVERS lists both DHCP servers. OPTIONS carries the IPv4 flag and the
relay's two interface roles: -id eth1 accepts client requests on the
remote LAN only, and -iu eth2 accepts server replies arriving on the
primary-LAN side. Both roles are required because of how the answer
travels: the server sends its OFFER to the relay address stamped inside
the request (the giaddr, 192.168.233.2), and that packet arrives on
the relay's server-facing link - a relay listening only on eth1 would
forward the request and then lose every answer. Naming eth2 as
upstream-only is equally deliberate: a plain listening interface there
would also forward the primary LAN's own client broadcasts to the
servers as duplicate requests. INTERFACES stays empty because both
roles are expressed through OPTIONS. Debian runs this service through
its classic init script, which the systemd generator wraps as
isc-dhcp-relay.service reading this file - systemctl restart
isc-dhcp-relay starts it silently. The upstream ISC relay is
legacy-maintenance software - kept in Debian and straightforward,
but in production networks the same function usually lives in the
site's routers and switches; the packet mechanics are identical.
On the server side, the relay needs nothing new: subnet 2 in the
Section 22.5.1 listing already exists, and it has no interface
binding precisely because relayed requests select it by giaddr.
When a request arrives stamped giaddr 192.168.233.2, Kea matches
that address against its subnets, finds subnet 2, and grants from
that pool with the relay network's own options - gateway
192.168.233.2 (the relay is the remote LAN's router) and the
resolver address.
Now the client, on relayclient - as john:
$ sudo dhclient -1 -v eth1
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/52:54:00:55:af:68
Sending on LPF/eth1/52:54:00:55:af:68
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 192.168.233.100 from 192.168.233.2
DHCPREQUEST for 192.168.233.100 on eth1 to 255.255.255.255 port 67
DHCPACK of 192.168.233.100 from 192.168.233.2
bound to 192.168.233.100 -- renewal in 235 seconds.
The exchange reads normally with one telling difference: the
OFFER's source is 192.168.233.2 - the relay, not the server. The
client broadcast on its own link; the relay forwarded the request
to ns1 unicast with giaddr set; Kea answered subnet 2's pool
address back through the relay; and the client only ever saw its
own subnet's router. The server's log shows the same walk from the
other side - as root on ns1:
# grep -E 'DHCP4_(PACKET|STARTED)' /var/log/kea/kea-dhcp4.log | tail -4
2026-11-22 11:15:48 INFO DHCP4_PACKET_RECEIVED [hwtype=1 52:54:00:55:af:68], cid=[no info], tid=0x4770cf43: DHCPDISCOVER (type 1) received from 192.168.232.12 to 192.168.232.10 on interface eth1
2026-11-22 11:15:48 INFO DHCP4_PACKET_SEND [hwtype=1 52:54:00:55:af:68], cid=[no info], tid=0x4770cf43: trying to send packet DHCPOFFER (type 2) from 192.168.232.10:67 to 192.168.233.2:67 on interface eth1
2026-11-22 11:15:48 INFO DHCP4_PACKET_RECEIVED [hwtype=1 52:54:00:55:af:68], cid=[no info], tid=0x4770cf43: DHCPREQUEST (type 3) received from 192.168.232.12 to 192.168.232.10 on interface eth1
2026-11-22 11:15:48 INFO DHCP4_PACKET_SEND [hwtype=1 52:54:00:55:af:68], cid=[no info], tid=0x4770cf43: trying to send packet DHCPACK (type 5) from 192.168.232.10:67 to 192.168.233.2:67 on interface eth1
Four lines, one transaction: the request from the relay's LAN
address 192.168.232.12, the answer to the relay's remote
address 192.168.233.2:67 - the giaddr round trip in log form,
with the same transaction id 0x4770cf43 tying all four lines
together.
The remote client still needs a route to the services themselves for DNS, since its lease carries the LAN's resolver addresses. Add the return path - on relayclient, as john:
$ sudo ip route replace 192.168.232.0/24 via 192.168.233.2
Silent. Now the name service works across the router, and the lease-to-record chain proves the whole path - the relayed client's name, assigned by the same DDNS machinery as every other lease:
$ dig @192.168.232.10 relayclient.handbook.test A +short
192.168.233.100
The remote subnet's client resolves by name through the same authoritative server, forward record and all. That single answer took the longest path in the chapter - broadcast, relay, unicast forwarding, subnet selection by giaddr, a lease, an update signed with a TSIG key, and a query back across the router.