Recently, I’ve been thinking about how to visualize the vast difference between IPv4 and IPv6. The challenge lies in the enormous difference in scale between the two, which is so large it’s difficult to represent clearly.
IPv4 offers around 4 billion distinct values, represented by a 32-bit address field. This means 4,294,967,296 distinct values. By saying ‘4 billion’, we simplify this by excluding about 294 million addresses, and saying ‘294 million’ still excludes nearly another million. So, we’re leaving out a lot of detail when discussing IPv4.
IPv6, on the other hand, represents 2 to the power of 96 more possible addresses. This difference, which is between 2 to the power of 128 and 2 to the power of 32, results in a staggering 79,228,162,514,264,337,593,543,950,336 possible addresses. Even trying to say this number feels absurd. It’s a 29-digit number, and words like ‘quintillion’ or ‘jintillion’ just don’t do it justice.
Analogies can help
Normally, I’m not a fan of analogies. They tend to break down quickly. My usual analogy, a steam train (I’m a trainspotter of old), doesn’t work well these days, since younger generations rarely encounter them outside museums. But analogies are valuable when they follow mathematical and physical laws. If we can find a situation in the real world that mirrors the difference between IPv4 and IPv6, it’s worth considering. And I think I’ve found one that works well.
Space is big. Really big.
I like to compare the difference in address spaces to the relative sizes of astronomical objects. This is helpful because it shifts our thinking from linear numbers (from zero to 4 billion) to volume, as stars are roughly spherical. Spheres are useful because their volume scales faster than their radius.
Volume and radius
The formula for the volume of a sphere is V = 4/3 π r³, where V is the volume and r is the radius. If we consider the radius of a sphere and compare different spheres by their radius, their volumes change significantly:
- A sphere with a radius of 1 unit has a volume of about 4.19 cubic units.
- A sphere with a radius of 2 units has a volume 33 times larger.
- A sphere with a radius of 10 units has a volume 4,000 times larger.
- A sphere with a radius of 100 units has a volume 4 million times larger.
Can we find a ‘unit’ to compare?
Instead of considering all the bits of the entire IPv4 address space, let’s focus on the portion an ISP assigns to a customer. In IPv6, the 128-bit address space is often viewed as a 64-bit address space when discussing customer sub-delegations, which is common practice in many networks. A typical IPv6 subnet uses a /64 boundary, which corresponds to a single IPv4 address. For comparison purposes, this simplifies things because the subnet boundary in home networks is typically a /64.
Now, consider the ratio between a /64 in IPv6 and a /32 in IPv4. They compare as 2^32, or approximately 4 billion times larger.
Comparing spheres
To put this into perspective, we can imagine a sphere that is 4 billion times the size of the original ‘unit’ sphere. This sphere would have a radius of about 1,008 units. This size is the same ratio between a /64 in IPv6 and a /32 in IPv4.
Visualizing the scale
If you think about these two spheres, one representing IPv4 and the other representing IPv6 with a radius 1,008 times larger, you can imagine just how much more space there is in IPv6.
Can we do better?
Another useful unit in IPv6 is the /56, which is often used in broadband networks to assign customers a larger range of subnets, typically 256 different /64s. If we consider the /56 as equivalent to the single IPv4 address, we get a more relatable scale.
With this scale in mind, we can imagine the sphere as a whole.
Are there stars this big?
Interestingly, there are stars in the universe that match these relative sizes. For example, Epsilon Pegasi, a star in the Pegasus constellation, is between 169 and 185 times the size of the Sun. This corresponds quite well to the /56 comparison.
When we scale back to the /64, we’re looking at stars about 1,008 times the size of the Sun, which tend to be red supergiants. KW Sagittarii, a red supergiant in the Sagittarius constellation and one of the largest known stars, is a good example of such a star.
These stars are massive and far away, reminding us of the vastness of IPv6 address space and the likelihood of exhausting it.
The views expressed by the authors of this blog are their own and do not necessarily reflect the views of APNIC. Please note a Code of Conduct applies to this blog.
Amazing work sir
Once I was reading the landscape of both the IPv4 & IPv6. That was giving a clearer picture.
IPv4: Imagine a small town with 4.3 billion houses. Each house represents a unique IP address.
IPv6: Now, 340 undecillion plots of land available for building houses. The number of residents and devices, ensuring that everyone has a place to connect.
I like the analogy of stars very much, thank you for sharing this!
However, if a /64 portion of IPv6 adress space corresponds to a single LAN, and a /56 porition to 256 LANs, in figure 3 the big yellow sphere should represent a /56 adress space and the smaller yellow sphere the /64 adress space.