IPv6 simplified – why a /64 is the minimum

Hey IPv6 nerds: this blog post is a simplification of SLAAC, RA, NDP, and EUI-64 to help the IPv6 learners and IPv6 deniers begin to understand IPv6. Don't get all smart-assy because it turns people away from learning. Remember, this was once a new and strange concept to you too! Plus, the more people we get to understand IPv6, the faster we can reach a full global deployment and IPv4 can live in tech museums like IPX/SPX.

You may have heard that the absolute minimum size for a IPv6 network is a /64 (prefix – there aren’t really “subnets” in IPv6). Curiosity gets to you because you know IPv6 address space is huge so you see how many addresses that is. It’s about 18,000,000,000,000,000,000. Or 18 quintillion IPs. “But why so many?!? I only have like 10 devices in my home!” you ask, because you’re trying to apply IPv4 concepts to IPv6.

Here’s the reason why. It’s a little thing called SLAAC or Stateless Automatic Address Configuration. It’s the thing that let’s your device configure its own IP. Think of it like APIPA. Except instead of giving you a non-routable IP, you get a real IP. No DHCP server needed! Hurrah!

But why is /64 the absolute minimum needed for SLAAC though? As you know, an IP address must be unique on a network. And in the case of IPv6, globally unique. Devices will typically use the EUI-64 method to generate a unique address on a network that won’t collide with another device. Your device learns about the network through a packet called a “RA” or Router Advertisement. This RA contains the prefix of the network and the default gateway address. Using EUI-64, your device takes the MAC, pads it (because after all, the MAC is 48 bits and we need 64 bits), and then attaches the prefix. Viola! A globally unique IPv6 address.

And if you’re a math wiz or just good at counting, 64 + 64 = 128. How many bits is an IPv6 address? 128! This is why you also shouldn’t use a prefix lower than /64. Some devices can only function with SLAAC. Android is a prime example. Guess which OS a lot of IoT devices like to use as a base OS? Yep. Android. So they also require SLAAC.

This is why you need an address space of 18 quintillion IPs! You have devices on your network from all sorts of manufacturers. The amount of space between OUIs is vast.

Here’s an example using two randomly generated MAC addresses:

b1:26:95:0e:f4:a7
40:dc:a2:c8:bf:c9

If I convert these to decimal, we have the numbers 194779267658919 and 71316368048073. If we open up the old calculator and subtract these two numbers, we find that there are 123,462,899,610,846 (that’s 123.4 trillion) potential MAC addresses that could exist on our network (and that’s just between these two devices!). That is why you need ~18 quintillion IP addresses.

Remember, IPv6 requires different thinking! You don’t need to “conserve” these addresses like you do IPv4. There is no such thing as IPv6 “waste”. It simply doesn’t exist.

1 thought on “IPv6 simplified – why a /64 is the minimum”

  1. Pingback: Routing IPv6 over Wireguard Tunnel – NightFox Blog

Leave a Comment

Your email address will not be published. Required fields are marked *