I’m using Debian package isc-dhcp-client 4.3.5-3. The dhcp server is my ISP and so I have no control over that end. See below for what happens when starting dhclient and the latest lease6 declaration from the dhclient6.leases file. When a new lease6 is appended to the file expired iaprefix entries aren’t being trimmed. During a RENEW6 all of the expired iaprefix(es) are rewritten into the lease6 declaration.
Additionally, the transcript below of an INIT-REBOOT doesn’t show the whole story. The run-parts dhclient-{enter,exit}-hooks.d goes through “X” (number of iaprefix entries) BOUND6 invocations followed by "X-1" DEPREF6 and "X-1" EXPIRE6 invocations.
Is this a bug or is there something I need to configure? I suppose I could edit and re-edit dhclient6.leases from time to time. For the time being I’ve written some kludgy scripts to work around this.
root@firewall:~$ dhclient -6 -P -v eth0.4
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
Listening on Socket/eth0.4
Sending on Socket/eth0.4
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Rebind, 0 ms elapsed.
XMT: X-- IA_PD 4e:02:74:7e
XMT: | X-- Requested renew +3600
XMT: | X-- Requested rebind +5400
XMT: | | X-- IAPREFIX 2001:db8:7997:1b00::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7993:200::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7993:1100::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7993:5d00::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7993:f600::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7996:2d00::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7996:9600::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7997:300::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7997:1400::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7997:1a00::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7997:1c00::/56RCV: Reply message on eth0.4 from fe80::8626:2bff:fedb:5f8b.
RCV: X-- IA_PD 4e:02:74:7e
RCV: | X-- starts 1507917549
RCV: | X-- t1 - renew +7200
RCV: | X-- t2 - rebind +10800
RCV: | X-- [Options]
RCV: | | X-- IAPREFIX 2001:db8:7997:1b00::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7993:200::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7993:1100::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7993:5d00::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7993:f600::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7996:2d00::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7996:9600::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7997:300::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7997:1400::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7997:1a00::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7997:1c00::/56
RCV: | | | X-- Preferred lifetime 0.
RCV: | | | X-- Max lifetime 0.
RCV: | | X-- IAPREFIX 2001:db8:7994:d500::/56
RCV: | | | X-- Preferred lifetime 14400.
RCV: | | | X-- Max lifetime 14700.
RCV: X-- Server ID: 00:03:00:01:84:26:2b:db:5f:8b
PRC: Bound to lease 00:03:00:01:84:26:2b:db:5f:8b.
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: | | X-- IAPREFIX 2001:db8:7994:d500::/56
XMT: | | | X-- Preferred lifetime +7200
XMT: | | | X-- Max lifetime +7500
XMT: V IA_PD appended.
XMT: Rebind on eth0.4, interval 1000ms.