If your ISP has a native dual stack network then you shouldn’t have to set up anything for IPv6, maybe a couple of small settings. IPv6 is meant to be auto configured. You will see terms such as SLAAC or Sateless Address Auto Configuration, which is just what it sounds like. Router/gateway advertises its gateway address, typically a link-local address beginning with fe80::, a DNS address to use, and the prefix address (global routing address along with the subnet prefix). Clients use the RAs to configure IPv6 on their interfaces.
A lot of what you know about the way IPv4 works doesn’t apply to IPv6, mainly NAT. With IPv6, every device on the planet has a unique global address that can be addressed directly. For example, the IPv6 address above could be 2603:8000:3a2e:f100::1e, the first three octets, 2603:8000:3a2e are my ISP’s routing address, then the f100 is called the subnet prefix and is dependent on how many of those digits your ISP gives you and only you. My ISP gives me a /56 which means the last two digits or 00 in the f100 are mine to assign subnets with. That gives me 256 subnets to use if I wish. The remaining four octets or lesser /64 in the address is the client ID and is unique, that identifies the client.
Many clients will have more than one global IPv6 address, one is permanent on the subnet and is meant to be a stable address you can use to send traffic to the client. The second IPv6 address is a privacy extension address and is used by the client for outbound traffic. Clients will periodically generate a new privacy address, typically once a day and is meant for privacy so the client can’t be tracked easily by IPv6 address.
If you have a router that’s finicky to setup IPv6, I would recommend getting a better one. There’s no reason a router shouldn’t have perfect IPv6 support in 2022. Next, make sure it’s enabled and if it asks for a prefix length or something like that, start with /48, if it doesn’t work because the ISP just rejects the request then try /56 then finally /64, that’s the absolute minimum they should give you, which is enough for one subnet.
In Linux and Raspberry Pi in particular, you can disable the privacy extension setting and have it generate a client ID from its MAC address. That is changed in /etc/dhcpcd.conf
, comment out slaac private
and uncomment slaac hwaddr
this way your Pi will use the same lesser /64 for all of its IPv6 addresses. That will keep the address the same, unless your ISP changes your IPv6 prefix (which they really shouldn’t) so you can set that in externalip
Sorry for the essay and please ask if you want more information about anything.