TrueNAS System lost the IPv6 GUA Address

Hello everybody!

I encountered a rather peculiar issue. My routing system is running Mikrotik’s Router OS, which configures IPv6 via SLAAC. The router has correctly obtained the IPv6 prefix, with the maximum Valid Lifetime for IPv6 addresses set to 90 minutes. The NAS system is running version 25.04.0, and its network configuration includes a br0 interface configured with a static IPv4 address and the “Autoconfigure IPv6” option checked. Upon system startup, it correctly acquires a GUA (Global Unicast Address). However, once this address expires, the system fails to obtain a new IPv6 address, leaving only the IPv4 address and the FE80 link-local address. Interestingly, the IPv6 addresses of the Instances using the same bridge do not exhibit this problem.

Do you all have any suggestions? If more information is needed, I can also provide it.





Below is the IPv6 configuration on the router.


Network status after restart

The “Autoconfigure IPv6” stuff is broken, there are some threads on it if you search back. Here is a workaround which works for some of us. Maybe that would resolve your issues too.

(post deleted by author)

(post deleted by author)

Thanks for the info, but I tried it and it didn’t work for me.

tcpdump -i br0 -vvv -n 'icmp6 && ip6[40] == 134'

tcpdump: listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
19:38:38.696933 IP6 (class 0xc0, flowlabel 0x748fa, hlim 255, next-header ICMPv6 (58) payload length: 112) fe80::be24:11ff:fe2a:9b41 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 112
	hop limit 64, Flags [none], pref medium, router lifetime 2700s, reachable time 0ms, retrans timer 0ms
	  source link-address option (1), length 8 (1): bc:24:11:2a:9b:41
	    0x0000:  bc24 112a 9b41
	  rdnss option (25), length 24 (3):  lifetime 2700s, addr: fe80::be24:11ff:fe2a:9b41
	    0x0000:  0000 0000 0a8c fe80 0000 0000 0000 be24
	    0x0010:  11ff fe2a 9b41
	  prefix info option (3), length 32 (4): fd78:3006:d75c::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 fd78
	    0x0010:  3006 d75c 0000 0000 0000 0000 0000
	  prefix info option (3), length 32 (4): 2408:823d:c11:aa0::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 2408
	    0x0010:  823d 0c11 0aa0 0000 0000 0000 0000
19:40:40.471600 IP6 (class 0xc0, flowlabel 0x748fa, hlim 255, next-header ICMPv6 (58) payload length: 112) fe80::be24:11ff:fe2a:9b41 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 112
	hop limit 64, Flags [none], pref medium, router lifetime 2700s, reachable time 0ms, retrans timer 0ms
	  source link-address option (1), length 8 (1): bc:24:11:2a:9b:41
	    0x0000:  bc24 112a 9b41
	  rdnss option (25), length 24 (3):  lifetime 2700s, addr: fe80::be24:11ff:fe2a:9b41
	    0x0000:  0000 0000 0a8c fe80 0000 0000 0000 be24
	    0x0010:  11ff fe2a 9b41
	  prefix info option (3), length 32 (4): fd78:3006:d75c::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 fd78
	    0x0010:  3006 d75c 0000 0000 0000 0000 0000
	  prefix info option (3), length 32 (4): 2408:823d:c11:aa0::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 2408
	    0x0010:  823d 0c11 0aa0 0000 0000 0000 0000
19:41:41.969202 IP6 (class 0xc0, flowlabel 0x748fa, hlim 255, next-header ICMPv6 (58) payload length: 112) fe80::be24:11ff:fe2a:9b41 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 112
	hop limit 64, Flags [none], pref medium, router lifetime 2700s, reachable time 0ms, retrans timer 0ms
	  source link-address option (1), length 8 (1): bc:24:11:2a:9b:41
	    0x0000:  bc24 112a 9b41
	  rdnss option (25), length 24 (3):  lifetime 2700s, addr: fe80::be24:11ff:fe2a:9b41
	    0x0000:  0000 0000 0a8c fe80 0000 0000 0000 be24
	    0x0010:  11ff fe2a 9b41
	  prefix info option (3), length 32 (4): fd78:3006:d75c::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 fd78
	    0x0010:  3006 d75c 0000 0000 0000 0000 0000
	  prefix info option (3), length 32 (4): 2408:823d:c11:aa0::/64, Flags [onlink, auto], valid time 5400s, pref. time 2700s
	    0x0000:  40c0 0000 1518 0000 0a8c 0000 0000 2408
	    0x0010:  823d 0c11 0aa0 0000 0000 0000 0000

After comparing the IPV6-related sysctl parameters, only one parameter, net.ipv6.conf.{iface}.forwarding, differs. The normally functioning machine does not allow forwarding, whereas TrueNAS permits it by default

Possible values are: 0 Forwarding disabled 1 Forwarding enabled

FALSE (0):

By default, Host behaviour is assumed. This means:

  1. IsRouter flag is not set in Neighbour Advertisements.
  2. If accept_ra is TRUE (default), transmit Router Solicitations.
  3. If accept_ra is TRUE (default), accept Router Advertisements (and do autoconfiguration).
  4. If accept_redirects is TRUE (default), accept Redirects.

TRUE (1):

If local forwarding is enabled, Router behaviour is assumed. This means exactly the reverse from the above:

  1. IsRouter flag is set in Neighbour Advertisements.
  2. Router Solicitations are not sent unless accept_ra is 2.
  3. Router Advertisements are ignored unless accept_ra is 2.
  4. Redirects are ignored.

Default: 0 (disabled) if global forwarding is disabled (default), otherwise 1 (enabled).

So the temporary solution is:

System → Advanced Settings → Sysctl → Add

net.ipv6.conf.{iface}.accept_ra = 2

I also submitted a bug report to ix.
https://ixsystems.atlassian.net/browse/NAS-135715

Tips:

When modifying certain IPv6 configurations such as sysctl net.ipv6.conf.all.forwarding=0, the forwarding attribute of all network interfaces is set to 0. However, autoconf and accept_ra do not adhere to this behavior. After configuring sysctl net.ipv6.conf.all.accept_ra=0, the accept_ra value of eth0 can still retain its original value (which could be 0 or another value), indicating that the parameter net.ipv6.conf.all.accept_ra has no practical effect. This behavior has also been reported in some cases, such as Bug #997605 “Disabling IPv6 autoconfiguration in sysctl.conf doe...” : Bugs : linux package : Ubuntu, which appears to be a kernel bug that has persisted for nearly a decade (Linus: No, it’s a feature™), spanning three major kernel versions from 3.4 to 5.4. This realization made me feel that I had been overly optimistic before, as the versions 4.9 to 4.15 now seem insignificant in comparison. The workaround for this issue is to ensure that the configurations on the required network interfaces are correct, rather than attempting to use all. It is frustrating that, although this problem is not fatal, it has managed to exist for so long, which is truly difficult to comprehend.

Reference:

https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt