Static ipv6 addresses

Hi,
I haven't toyed with ipv6 that much, however I did manage to get he.net working and my DHCP server is assigning ipv6 no problem it seems.

My question is: How do I set static ipv6 ips to my local devices that already have ipv4 static ip addresses so I can access them via ipv6 if ipv4 is off?

currently I have in my /etc/hosts file:

192.168.76.1 gatekeeper gatekeeper.myprivdomain.ca (OpenWRT Router)
192.168.76.10 titan titan.myprivdomain.ca
192.168.76.15 phonebox phonebox.myprivdomain.ca
192.168.76.20 printmaster printmaster.myprivdomain.ca
etc..

My DHCP pool starts at 192.168.76.100 to 192.168.76.250

thanks!

Stateless auto-configured addresses via SLAAC are already static. If privacy extensions are enabled, a host gets an additional address but is still reachable via the stateless auto-configured address. If you also use DHCPv6, you're able to make IP reservations using the MAC address and DUID, almost like you did with IPv4.

1 Like

Please bear in mind that you can have multiple IPV6 prefixes on your hosts, including the ULA, which comes in handy for local traffic. In your case, you'll have at least two permanent IPV6 addresses, one with ULA and the other one from he.net, plus the temporary addresses.

Next, if you really want them to be static you should set them on the hosts themselves then call them by name via an authoritative nameserver for your domain. If you're just happy with "seemingly" static addresses, you can get by with DHCP reservations: this is what I do, for IPV4 as well as IPV6. The big advantage of reservations is that dnsmasq takes care of answering dns queries correctly. The disadvantage is that you might have temporary failures if you reboot your router until the time when a host renews the lease.

1 Like