I’m used to IPv4, and I’m new to IPv6. I understand that, instead of handing me a ::/128 and forcing me to NAT everything, my ISP appears happy to give me a dynamic ::/60. I also understand (I think) that each subnet should have its own ::/64, so if I’m given a ::/60, I should be able to have up to 16 subnets (I have a few VLANs, so this is plenty).
The way that I’m picturing IPv6 addresses is as follows:
DDDD:DDDD:DDDD:DDDS:LLLL:LLLL:LLLL:LLLL
With the first 60 bits (D’s) dynamically assigned by my ISP, the next 4 bits (S) statically assigned to subnets by my router, and the remaining 64 bits (L’s) basically left up to devices (I think??). And I guess, somehow, if my ISP changes all the dynamic bits, everything will “just work”?
How do I assign those bits to each subnet? Also, my ISP appears to be giving my router both a prefix and an address that is on a completely different subnet. What’s that about? Why can’t/shouldn’t I just have my router be e.g. DDDD:DDDD:DDDD:DDDS::1 on each subnet, both locally and to the outside world?
Here’s what I’ve done so far (mostly copying/pasting without understanding until something worked):
/ipv6 settings set accept-router-advertisements=yes
/ipv6 dhcp-client add request=address,prefix pool-name=test-ipv6 interface=ether1 prefix-hint=::/60 add-default-route=yes
/ipv6 nd set interface=ether1 mtu=1500 ra-lifetime=none reachable-time=5m 0
/ipv6 nd prefix default set preferred-lifetime=4h valid-lifetime=4h
/ipv6 address add from-pool=test-ipv6 address=::1 interface=WIRED_VLAN
This appears to work, and my workstation thinks it has a couple ipv6 addresses (one “temporary dynamic” and the other “dynamic mngtmpaddr noprefixroute”).
To add subnets, should I just add more /ipv6 addresses but instead of ::1 do ::1:0000:0000:0000:0001, ::2:0000:0000:0000:0001, etc. for each subnet? Should I be doing something with /ipv6 dhcp-server? I know I configured it with just ::1 but the first 60 bits got filled in automatically. Will that be a problem every time the dynamic address changes?
Also, I’m confused about prefix lengths. For example, if I run /ipv6 pool print, I see a PREFIX of xxxx:xxxx:xxxx:xxx0::/60 but PREFIX LENGTH is set to 64. Why 64 instead of 60? And should I be creating a pool for each subnet or anything like that?
Sorry this is so disorganized—I’d normally try and organize questions into an ordered list, but in this case, I don’t even know what the right questions are. Thank you for reading.