IPv6 accept_rtadv for default route and prefix but force host portion of /64 address?

From: Tom Pusateri <pusateri_at_keehole.org>
Date: Mon, 29 Sep 2025 21:32:59 UTC
Is there a way to change the configuration in /etc/rc.conf to get the prefix from the router advertisement but fix the host portion to something like ::123 so that I can change network cards in the server and never have to worry about the IPv6 address changing?

I have a DMZ interface on a FreeBSD router with a prefix delegation from my provider I assign to a downstream interface. I have another FreeBSD server on the DMZ network and would like it to have a fixed address allocated out of the assigned prefix from the router.

The router (also FreeBSD) is running rtadvd providing SLAAC and router advertisements.

The /etc/rc.conf for the DMZ server currently looks like this:

ifconfig_igb0_ipv6="inet6 2605:1:2:3::123/64 accept_rtadv”

This works fine and manually assigns the address out of the assigned prefix range as configured on the router.

It also assigns a second IPv6 address via SLAAC that I don’t use.

ifconfig output looks like this:

igb0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
	options=4e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS,MEXTPG>
	ether ac:1f:6b:1a:04:c0
	inet 1.2.3.123 netmask 0xfffffff8 broadcast 1.2.3.127
	inet6 fe80::ae1f:6bff:fe1a:4c0%igb0 prefixlen 64 scopeid 0x1
	inet6 2605:1:2:3::123 prefixlen 64
	inet6 2605:1:2:3:ae1f:6bff:fe1a:4c0 prefixlen 64 autoconf pltime 604800 vltime 2592000
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>

I get the correct upstream next hop for a default route:

% netstat -nra6
Routing tables

Internet6:
Destination                       Gateway                       Flags         Netif Expire
::/96                             link#3                        URS             lo0
default                           fe80::207:43ff:fe31:7078%igb0 UG             igb0


The problem with this is that the IPv6 prefix is configured on the router and configured on the server.

Thanks,
Tom