Subnet Masking in IPv6

I know within IPv4 subnet masking, the network is determined by either the 1st, 2nd or 3rd set of octets. Being there are so many more characters in IPv6, how do you determine the subnet mask?


Solution 1:

The network is not related to the octets. Octets were substantive many, many years ago - now they're just for readability for us humans. IP addresses are just numbers; representing them as we do is just easier. Try ping 134744072 (which is 8.8.8.8, Google's public DNS server), for instance.

The length of the subnet mask is simply a number of bits - a mask of 8, 16, or 24 bits will align with octets, but a mask of any length, any number of bits, is valid. Review the answers to this question for all that you need to know and more.

In IPv6, the same is true; a valid mask is of any length, and does not need to align to one of the 16-bit colon-separated fields (which are, again, only for our human readability).