Re:Stateless Kubernetes overlay networks with IPv6
by jmillikin on Saturday February 20, 2021 @04:52PM
(#26208325)
A ULA prefix is, properly, 48 bits long -- `fd` plus 40 bytes of random data. Using the full 32 bits of IPv4 means that you'll be using only 24 bytes of randomness there.
Does this matter? Probably not. But when I have the option, I like to conform to the RFCs.
You can explore this a bit further and set up some net namespaces, connect them to the host vm via a bridge device, assign them ipv6 addresses from the vm host /64 network, and then set up a default route inside each container to the /32 or /40 you're using via the vm host's address on the host local /64. It's cool to see one container on host 1 talk to another on host 2. You're basically subnetting the /40 for each host; each host is analogous to a household in 6rd, and the containers are like your devices on your lan with globally routable ipv6 addresses (except we're using a ULA prefix instead of a globally routable ipv6 prefix assigned to an ISP, so our containers are not globally addressable - whatever). I'd guess this is what the CNI thing you mention does under the hood. For others who are interested in this, it's basically combining OP's article with https://iximiuz.com/en/posts/container-networking-is-simple/ from a couple months ago.
The Teredo part was very interesting as well, I had not thought to worry about non-udp/tcp compatible intermediate systems.