5 ms·
A /64 is a 64-bit network mask on the 128bit ipv6 address, effectively leaving you with 64 bits for host addresses on that subnet. A /128 is a 128bit mask, lea
by count 15y ago
A /64 is a 64-bit network mask on the 128bit ipv6 address, effectively leaving you with 64 bits for host addresses on that subnet. A /128 is a 128bit mask, leaving you with 0 extra bits (ie: a single host address).
2^(128-n) is the way it works for HOST addresses (no '-1', as in ipv4, as there is no broadcast address in ipv6, and 128-128=0, so 2^0=1, a single host address). 2^n is the way it works for networks/subnets, so a /128 leaves 2^128 possible networks, each with 2^0 hosts on them, while a /127 leaves 2^127 networks, each with 2^1 hosts on them.
A /64 is equal to the square of the entire existent ipv4 space (/32), and should be more than enough for any subnet anywhere, ever (it's roughly 18,446,744,073,709,551,615 IPs).
The issue is that many of the 'fundamental' protocols are built on assumptions that the smallest network will be a /64, and if your ISP gives you 1 /64, you can't have more than one 'network' on your end of the connection - even if you can have 18 quintillion addresses, they all have to be on the same subnet, so no fire-walling/etc. within your network.
- agwa 15y agoThis is a good explanation. To elaborate on the /64 network assumption, it has to do with stateless autoconfiguration, which is the way of configuring IPv6 addresses. An IPv6 address is comprised of a 64 bit prefix followed by a 64 bit "interface ID." The interface ID is inherent to an interface, and is derived from the MAC address, since it is guaranteed to be globally unique. When you bring up an interface, the OS listens for router advertisements which contain the 64 bit prefix. It takes this prefix and appends the interface ID to generate a full IPv6 address which is unique. This is really cool because it means your computer will always have the same lower 64 bits no matter where you take it, and it can auto-discover the prefix without the complexities of DHCP. (Note that there were some concerns about tracking computers using the lower 64 bits, which led to the optional privacy extensions, under which the interface ID is randomly generated.) However, the standard requires that the interface ID be 64 bits, so if you only have a /64 from your ISP you are, practically speaking, limited to 1 subnet. For this reason, I like to measure prefix lengths in terms of subnets rather than IPv6 addresses.
- count 15y agoIt's way more than stateless autoconfig - privacy addresses and a host of other protocols assume the last /64 is a host address and flexible. What a horrible assumption to tack on though - it should have been codified in the v6 RFC if that's how it's going to work.