On 6/11/26 5:07 AM, Stuart Henderson wrote:
On 2026-06-10, Geoff Steckel<[email protected]> wrote:
I have systems where I want to assign permanent host parts (lower 64 bits)
with ifconfig or hostname.xxx
My upstream provider occasionally renumbers my network.
Is there any combination of utilities/configurations which will
monitor prefix information handed down from a router
update interface prefix(es) -only-
RTFM pointers appreciated as always.
thanks
geoff steckel
if you don't mind _what_ the lower 64 bits are, as long as they're
consistent over time, just turn off temporary addresses..
I do care what the lower 64 bits are for the global address.
(messy reasons).
if you want to specify them, I'm pretty sure you'll need DHCPv6, which
is more of a pain to configure, as the default on most client devices is
to use some form of SLAAC (either the original form based on MAC, or
temporary addresses, or SOII) - there is no support for this in OpenBSD
base (only for DHCPv6-PD, which is different, as a client; nothing for
aerver side).
you know you can have multiple prefixes advertised on a network? so you
can have a ULA (pick your own from fc00::/7) and a globally routable
(i.e. from your ISP) - then you'll have a stable address (all bits)
for local connections. (or you can manually configure ULA on machines
but also run autoconf for a globally routable address).
DHCP6 and SLAAC seem to fight. ULAs? (see below).
Right now I run dhcp6leased(8).
It always assigns ::1 to the router interface.
When I notice IPv6 doesn't work I poke dhcp6leased then
manually reconfigure the rest of the router and all the clients
Superficial scanning of slaacd(8) code suggests setting
-soii and -temporary then autoconf6on an interface
after dhcp6leased finishes negotiating might preserve low order bits.
It's a surprise.
I'll set up spare systems and try this.
I saw comments about "64 bits of host address".
That could cause problems with a /56.
I didn't look to see what it would do if it found addresses
e.g. ULA already configured.
dhcp6leased(8) doesn't set a default IPv6 route using
my configuration. Manually setting a default route works.
I can investigate further if anyone asks (verbose logging etc.)
I'll scan the source but I don't know if I'll see
anything useful.
Handling global configuration changes automatically when
an IPv6 prefix changes is a separate problem.
A grotesque solution would be to wrap tcpdump(8) to monitor
RA messages or read route(9) to trigger a monstrous script.
ULAs seem to cause source address choice to do unexpected things.
Host with global & local addresses sending to a local address:
Source address used is global. Perhaps harmless?
Perhaps a configuration error on my part?
An issue to investigate.
I use link level addresses for local servers (hack).
thanks,
geoff steckel
Configuration:
router:$ cat /etc/dhcp6leased.conf
request prefix delegation on cnmac2 for { cnmac0/56 }
router:$ cat /etc/hostname.cnmac0
inet 192.168.x.x 255.255.255.0
inet alias 192.168.y.x 255.255.255.0
inet alias 192.168.z.x 255.255.255.0
up
inet6 up
router:$ cat /etc/hostname.cnmac2
group extern
inet6 up
dhcp
grep dhcp6leased /etc/rc.conf.local
dhcp6leased_flags=
router:$ ifconfig
cnmac0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr f0:xx:e7
index 1 priority 0 llprio 3
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 192.168.x.x netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::fxxx:9ee7%cnmac0 prefixlen 64 scopeid 0x1
inet6 2xxx:xxxx:xxxx::1 prefixlen 56 pltime 4655 vltime 4655
cnmac1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
lladdr f0:xx:e8
index 2 priority 0 llprio 3
media: Ethernet autoselect (none)
status: no carrier
cnmac2: flags=808843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4>
mtu 1500
lladdr f0:xx:e9
index 3 priority 0 llprio 3
groups: extern egress
media: Ethernet autoselect (1000baseT full-duplex,master)
status: active
inet6 fe80:::xxxx;cnmac2 prefixlen 64 scopeid 0x3
inet x.x.x.x netmask 0xffffff00 broadcast x.x.x.255