Cascading IPv6 routers

I would like to accomplish this setup:

Internet - (A) - (B) - (Network)

Router A has a public IPv6 address:

A_EXT 2a02:511:2c00:111:209:50:118:1/48

I have assigned:

A_INT 2a02:511:2c00:111::1/64

B_EXT 2a02:511:2c00:111::1000/64

Up until this point it works. I can ping6 internet hosts from B and B is pingable from the Internet.

Now what I would like to do is to add another IPv6 IP to B's internal interface and use B to give out some IPs on it's network which should be also fully reachable on the Internet. As I have read this can lead to issues if I use the same subnet mask on B for example if I would do:

B_INT 2a02:511:2c00:111::2/64

What should be the internal IP, the prefix and the network inside B?

A /120 would be enough for me with 256 hosts.

is this enough on router B as well and running radvd with the right prefix or is there more to it:

sysctl -w net.ipv6.conf.all.forwarding=1


Solution 1:

One /48 is a typical prefix size for one site or small organization, containing 64 thousand /64 nets. And each of those /64s has effectively unlimited IP addresses. Forget counting IP addresses. Standardize on /64s for all nets, so features will continue to work.

Assign /64s every time it makes sense to subnet. Perhaps 2a02:511:2c00:201::/64 and 2a02:511:2c00:202::/64 are on-link to A, and 2a02:511:2c00:301::/64 and 2a02:511:2c00:302::/64 are on-link to B. Each of these could be a security zone, a vlan, a DHCP range, a container host, or however else you wish to subnet.

Routers need to learn each other's nets. Use an IGP, or in the simple case static routes. Traffic will actually be via link local addresses between on-link routers.

Allocate your address plan on 4-bit boundaries to make route aggregation easy. In my example, the "300" series of subnets on B is 2a02:511:2c00:300::/56 and is reachable via A.

IPv6 subnetting is about the number of /64 nets, not changing their size.