With IPv6 we do not have the concept of subnet masks, instead we just allocate a portion of the 128 bit IPv6 address as a Subnet address. Take a look at the example above where we have a 48 bit global prefix, 16 bit subnet and 64 bit interface ID.
In the example a Regional Internet Registry has issued a Global Routing Prefix of 2001:0B6E:2222 to an organisation with a Prefix Length of /48. It is really up to the organisation how it allocates the remaining bits. In this instance, a network administrator has allocated 16 Subnet bits with Hexadecimal 0011, which provides for up to 216 Subnets each with 264 Host Interface IDs. Using 16 bits and 64 bits for Subnet ID and Interface ID respecively just keeps the maths simple, but the administrator could have chosen 20 bits or 24 bits for the Subnet ID. With 216 or 65535 Subnets, any company would be catered for.
Routers list the Subnet ID, otherwise known as the Prefix ID in their Routing Tables alongside the Prefix Length 2001:0B6E:2222:11::/64
If you use a single Prefix Length for all your Subnets as most organisations do, then starting with the Global Routing Prefix you can write down all Subnet IDs in the Subnet Field using Hexadecimal notation.
The Subnet IDs will all use the same Global Routing Prefix
Each Subnet will have a unique value in the Subnet Field
The Interface ID will be all 0s for each Subnet.
Let us calculate the first few Subnet IDs from the following Global Routing Prefix assuming we are using the fourth quartet for Subnet IDs:
2001:07A2:1111::/48 using the fourth quartet for Subnet IDs:
Remember when you start to increment the Subnet ID numbers you are not counting in Binary but in Hexadecimal, so the IDs go from 1 – 9 then A – F and then to the next column.
The example shown is using a Global Routing Prefix, but what about using Unique Local Unicast addresses, which perform a function similar to Private RFC 1918 addressing with IPv4? Let us look at an example: