Configuring IPv6 Unique Local Addresses

jem

Well-Known Member

Reaction score: 67
Messages: 385

Hello all.

I'm attempting to configure IPv6 Unique Local Addresses alongside the existing global addresses that are in use on my home network, as the global addresses are from a dynamic prefix delegation and could change from time to time. I want the ULAs to be handed out statefully using DHCPv6 static leases so that they won't change over time.

I've generated a random ULA prefix of the form fdxx:xxxx:xxxx::/48 and have assigned the first /64 subnet of it to my LAN, with the first :1 address configured on the interface on my FreeBSD gateway. rtadvd has started advertising the new prefix alongside the existing global one but the problem is that my LAN hosts are automatically configuring their ULAs with SLAAC as well. I don't want this, I want them to only obtain them through DHCPv6.

From rtadvd.conf(5), it appears that you can enable/disable an "autonomous address-configuration" flag for each prefix that is advertised, which informs hosts whether to use SLAAC to configure their own address or not. However, adding configuration for the ULA prefix to disable that flag causes rtadvd to no longer automatically advertises all on-link prefixes that it finds on an interface, and so the global prefix stops being advertised.

With no rtadvd.conf file:

Code:
# rtadvctl -v show
lan0: flags=<UP,CONFIGURED,PERSIST> status=<RA_SEND> mtu 1500
        DefaultLifetime: 30m
        MinAdvInterval/MaxAdvInterval: 3m20s/10m
        AdvLinkMTU: <none>, Flags: <none>, Preference: medium
        ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64
        AdvIfPrefixes: yes
        Next RA send: Fri Jan 25 19:30:46 2019
        Last RA send: Fri Jan 25 19:22:18 2019
        Prefixes (2):
          fdxx:xxxx:xxxx:yyyy:/64 (KERNEL, vltime=30d, pltime=7d, flags=LA)
          2a02:zzzz:zzzz:zzzz::/64 (KERNEL, vltime=30d, pltime=7d, flags=LA)
/etc/rtadvd.conf file created as follows:

Code:
lan0:\
        :addr="fdxx:xxxx:xxxx:yyyy::":\
        :prefixlen#64:\
        :pinfoflags="l":
Afterwards:

Code:
# rtadvctl -v show
lan0: flags=<UP,TRANSITIVE,PERSIST> status=<RA_SEND> mtu 1500
        DefaultLifetime: 30m
        MinAdvInterval/MaxAdvInterval: 3m20s/10m
        AdvLinkMTU: <none>, Flags: <none>, Preference: medium
        ReachableTime: 0s, RetransTimer: 0s, CurHopLimit: 64
        AdvIfPrefixes: yes
        Next RA send: Fri Jan 25 19:35:04 2019
        Last RA send: never
        Prefixes (1):
          fdxx:xxxx:xxxx:yyyy::/64 (CONFIG, vltime=30d, pltime=7d, flags=L)
Note that the although the autonomous 'A' flag has been removed from the fdxx: ULA prefix, the 2a02: global prefix advertisement has disappeared altogether.

It's not practical to add another :addr declaration for the global prefix, because it's dynamic and the configuration would have to keep being modified.

Can anyone suggest how to resolve this issue?

Thanks
jem

EDIT: corrected "site-local" to "Unique Local"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,409
Messages: 29,985

OP
OP
J

jem

Well-Known Member

Reaction score: 67
Messages: 385

OK, I used the wrong terminology, but the correct, non-deprecated prefix. Original post edited.
 
OP
OP
J

jem

Well-Known Member

Reaction score: 67
Messages: 385

After picking at this problem some more, I've discovered that a 'managed address configuration' flag can be set in the RA header. This seems to have the effect that my LAN hosts still configure themselves with addresses within the advertised prefixes (global and ULA) using SLAAC, but they're also requesting an address through DHCPv6, where I can lease an additional ULA of my choosing.

To set this flag, I amended my rtadvd.conf as follows:
Code:
lan0:\
        :raflags="m":
This meets my requirements.
 
Top