Stefan Haller
unread,Nov 30, 2021, 11:28:33 AM11/30/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to freebsd-...@freebsd.org
Hi everyone!
Is it possible to read out the values for pltime (preferred lifetime) or
vltime (valid lifetime) for an IPv6 address configured on an interface
with normal system tools (ifconfig)?
According to ifconfig(8) one can set both lifetimes. There doesn't seem
to be a way to obtain the current values though. The man page is
actually somewhat vague about the whole topic (Is it a relative or absolute
value? Is it a value in seconds?).
My precise problem is as follows: The router provided by my ISP is
announcing its /64 prefix with relatively long lifetimes. However, the
router is restarting automatically if it detects connectivity problems
or firmware/configuration updates. Usually the IPv6 prefix changes after
the router reboots. My FreeBSD box is therefore accumulating multiple
IPv6 addresses, most of them being invalid while still waiting for
lifetime expiry. Sometimes this results in connectivity problems
(Wireguard is using wrong source address).
I wrote a script that drops all IPv6 addresses if this case is detected.
After a few seconds the latest prefix is reconfigured due to a NDP
router advertisement. However, I would prefer a more robust solution
that drops all prefixes except the one with the highest vltime value.
Maybe someone has an idea how I could achieve this. Thanks in advance!
Best regards,
Stefan Haller