SLAAC thanks to dhcpcd makes IPv6 very much magical and generally having working IPv6 on NetBSD is a piece of piss; IPv6 at home was easy for instance.

However, when it doesn’t “just work” troubleshooting IPv6 seems immeasurably more complicated than IPv4 - for sure due to my lack of networking competency, but still.

Awhile back I had run into issues sending email from my Linode over IPv6 and had to get a separate 64 range. That had worked swimmingly for almost two years and then out of the blue IPv6 stopped working. I don’t think it was due to a reboot since I’m sure it was working after I resized, but I do now know my configuration in the Spamhaus post was wrong so perhaps it was broken even longer than I thought; However, in my recent troubleshooting I couldn’t even get the SLAAC address to work with autohost when it should have, so who knows?

I came so very close to throwing in the towel and deleting all my IPv6 DNS.

I had been reading through the Linode Linux Static IP Configuration guide and trying to translate that to NetBSD. I thought I had everthing in place:

  • All my IPs assigned to the interface, including the SLAAC address and link local as mentioned in various Linode forum posts (that typically I can’t find one example of now to reference).
  • Gateways assigned (I missed the IPv4 one by accident to start with and completely broke things; Had been taking IPv4 for granted).
  • dhcpcd turned off

But still I couldn’t get IPv6 to work.

Finally, thanks very much to this FreeBSD forum post, I realised that the IPv6 gateway needs the interface on it. And with that things started working.

This is my current setup which I am documenting for my benefit so I don’t forget:

  • etc/rc.conf

      # I have this commented out although probably shouldn't. I think perhaps it's the default?
      #ip6mode="host"
      # This is commented out now:
      #dhcpcd="YES"
    
  • /etc/ifconfig.wm0

      up
      inet 178.79.141.136 
      inet6 fe80::f03c:91ff:fe70:e653 alias
      inet6 2a01:7e00::f03c:91ff:fe70:e653 alias
      inet6 2a01:7e00:e000:035b::1 prefixlen 64 alias
      inet6 2a01:7e00:e000:035b::2 prefixlen 64 alias
    

    The alias are important.

  • /etc/mygate

      178.79.141.1
    
  • /etc/mygate6

      fe80::1%wm0
    

The good thing about this is I can also do sudo etc/rc.d/network restart and it doesn’t kill my connection.

On a related note… amongst all this (since I was rebooting things a LOT in the vain hope it would just start working again) I finally visited para-virtualisation again but it only seems to recognise the first disk and since I have three that’s not going to work for me so I’m sticking with full virtualisation.