Summary
dhclient@.service and the per-interface override (data/templates/dhcp-client/override.conf.j2) use:
ExecStop=... dhclient -4 -r ...
dhclient -r sends DHCPRELEASE and tears down local recovery state. After stop/restart the client cannot use INIT-REBOOT (DHCPREQUEST with the previous address) from the ISC -lf DB; the next start tends to DISCOVER (full DORA).
That breaks HA lease pre-share: the backup seeds /run/dhclient/dhclient_<iface>.leases before enable; any ExecStop -r path (or a restart that stops first) RELEASEs the lease the peer may still hold under a shared MAC and forces rediscovery.
Why it matters
- HA VRRP with shared ISP MACs: seed -lf before enable is meant to INIT-REBOOT (REQUEST) the same IP. RELEASE undoes that and can signal the ISP that the address is free while the other node still uses it.
- Production drill (2026-07-10): seeded -lf still saw DISCOVER on takeover; follow-up bench (2026-07-21, 1.5 rolling) isolated ExecStop -r as the smoking gun.
- Distinct from:
Reproduction (bench, VyOS 1.5 rolling)
On a DHCP WAN (e.g. eth5) with a live lease:
- snapshot -lf cp /run/dhclient/dhclient_eth5.leases /tmp/seed.leases
systemctl stop dhclient@eth5 - Wire: DHCPRELEASE; ipwrapper flushes dynamic addr
cp /tmp/seed.leases /run/dhclient/dhclient_eth5.leases systemctl start dhclient@eth5 - Wire after re-seed: DHCPREQUEST (INIT-REBOOT) + ACK when -lf intact
- With stock -r stop, the RELEASE alone already cleared server-side session;
- without re-seed, next start is DISCOVER.
Expected
ExecStop stops the client without DHCPRELEASE so the ISC -lf DB remains valid for INIT-REBOOT on the next start (HA seed / restart recovery).
Actual
ExecStop uses -r: DHCPRELEASE + local flush; next start does not reliably INIT-REBOOT from a preserved seed.
Suggested fix
Use dhclient -x (exit without release) in:
- src/systemd/dhclient@.service
- data/templates/dhcp-client/override.conf.j2
Explicit RELEASE remains available for operator workflows if needed; disable/restart should not RELEASE by default on a router.
Fix PR
https://github.com/vyos/vyos-1x/pull/5342
Environment
- VyOS 1.5 Circinus rolling (e.g. 2026.07.x)
- DHCP WANs, HA lease pre-share, shared ISP MACs