3 ms·
> So I simply assigned W:X:Y:Z:A:B:C:D to each container -- because, why not? Yes it's wasteful, but it's easy to figure out which is which! It makes me curiou
by qlk1123 8y ago
> So I simply assigned W:X:Y:Z:A:B:C:D to each container -- because, why not? Yes it's wasteful, but it's easy to figure out which is which!
It makes me curious. Did you apply any service-discovery mechanism in your IPv6-based container cluster? I wonder if IPv6 makes orchestration easier, tougher, or actually things just work transparently.
- devereaux 8y agoNo, I didn't do anything that fancy even if it's what I really wanted in the first place :-) Full story: initially I wanted to do SLAAC with different subnets for the different physical computers. To do that and use the MAC address of the containers in a "standard" way, I would have needed a larger subnet that what the provider even had for sale - but then everything would indeed have been much easier and automatic. In case it's not clear, imagine having W:X:Y::/48 like the xmas tree example, then using Z to identify which physical computer the container is on: then A:B:C:D are automatically derived from the hardware address of the (here virtual) interface. It's also very handy if you have multiple networks - say a wired and wireless setup: use a different value for each network on each site say Z=1 for your wired netword, Z=2 for your wireless, etc. Then you can automatically populate AAAA records like computername.connection.site.yourdomain.com. Why is it cool? Then if you need to check connectivity or push updates or whatever, you can ping6 ceolaptop.wifi.nycoffice.yourdomain.com- but don't worry, that IPv6 address will not be leaked if you are using the privacy additions (lft=0 aka deprecation): this laptop will use a "throwaway" IPv6 access so it can't be tracked (well, at least the mac address part, but good luck finding the needle in a haystack!) See https://en.wikipedia.org/wiki/IPv6_address#Stateless_address_autoconfiguration https://en.wikipedia.org/wiki/IPv6_address#Stateless_address... : A 64-bit interface identifier is most commonly derived from its 48-bit MAC address. A MAC address 00-0C-29-0C-47-D5 is turned into a 64-bit EUI-64 by inserting FF-FE in the middle: 00-0C-29-FF-FE-0C-47-D5. When this EUI-64 is used to form an IPv6 address it is modified:[1] the meaning of the Universal/Local bit (the 7th most significant bit of the EUI-64, starting from 1) is inverted, so that a 1 now means Universal. To create an IPv6 address with the network prefix 2001:db8:1:2::/64 it yields the address 2001:db8:1:2:020c:29ff:fe0c:47d5 (with the Universal/Local bit, the second-least-significant bit of the underlined quartet, inverted to 1 in this case because the MAC address is universally unique).