From time to time I stumble upon Tweets about counting the number of IPv6 addresses (1 2 3). While I think it is ok to do it that way when you’re new to IPv6 and you want to get an idea of it, it does not make sense at all because the mere number of IPv6 addresses is ridiculously high and only theoretically, but has no relevance for the real-world at all. Let me state why:
- First of all, the basic concept of IPv6 is not about the number of addresses such as “how to choose the subnet size appropriate to the number of clients I’m expecting”, but about the number of prefixes such as “how to subdivide my overall network into logical areas like security zone or business units”. It’s not about concrete IPv6 addresses at all. For each of your /64 subnets, which is the one and only subnet size you should ever use, you have 2^64 host addresses, which is de facto indefinitely.
- The underlying network infrastructure must somehow deal with the number of addresses. Most commonly Ethernet is used, which relies on MAC addresses. Switches have to take care of their MAC address tables, while routers are using the neighbor cache (the equivalent to the ARP cache for legacy IP) to know where to forward the Ethernet frame. Obviously, every single IPv6 address must be in the neighbor cache of a router. And those tables are limited in space, which is at most something like 512 k entries nowadays. You can argue that you can route an entire /64 to a single machine, using those addresses for vhosts or containers or something like this. Though, in the end, we won’t see many more than a couple of thousands of unique IPv6 addresses per subnet as they still require a state to be maintained.
If you want to get an idea about the advantages of IPv6 addresses, have a look at this poster. For more information about developing an IPv6 address plan for your enterprise, refer to this book, to this podcast, to this post, or similar. ?
But please don’t use IPv6 exhaustion counters or debate about whether or not we have enough IPv6 addresses for every atom on the surface of the Earth. ?♂️
Photo by Towfiqu barbhuiya on Unsplash.
Well said! I still remember my first experience with IPv6 after getting a /32 from a RIR and attempting to start an address plan while also trying to mentally process the overall amount of address space strictly in terms of the number of available addresses. As you correctly point out, thinking in terms of prefix counts (and prefixes along nibble boundaries) is the correct design criterion to use but because any prefix scheme will leave literally gajillions of IPv6 addresses forever unused, it’s hard to make the mental shift away from the scarcity model of IPv4 that is so ingrained in many network engineers minds and experiences.