SubnettingPractice.com The most extensive subnetting practice site on the web!

How To Subnet IPv6

IPv6 is going to replace IPv4. The simple reason is that IPv4 address space is running out. The world has reached the point where there are not enough 32 bit addresses to link every device which wants to connect to the Internet. IPv6 uses 128 bits. Much larger. Much much larger. IPv6 allows almost 8*1028 times as many addresses as IPv4. Basically, a number too large for the human mind to grasp.

Because of the enormity of IPv6 address space, subnetting will change. Currently we use CIDR and VLSM and NAT and other tools to conserve as much IPv4 space as possible. With IPv6 this is no longer a concern. The smallest subnet that is recommended for use in IPv6 is a /64! This means that even if you have 200 devices on a single /64, you still have 264-200 of unused space.

Because of the scale of IPv6, one no longer really worries about how many hosts are on a subnet. Rather the concern is how many subnets fit within a certain network. If you have a /48, how many /64s can you place inside this /48? These are the questions that IPv6 subnetting asks. Try IPv6 Subnetting.

IPv6 is written in hexadecimal which uses the digits 0-9 and a-f. A hexadecimal digit represents 4 bits, or 16 decimal units. Each IPv6 address is represented by eight groups of four hexadecimal digits. These groups are separated by colons. An example may be: 2001:0db8:2231:aaec:0000:0000:4a4a:2100. Try practicing binary.

Even though these addresses are written in hexadecimal units, they are still large and cumbersome. There are a couple of ways to shorten them. One or more leading zeros from each group can be dropped. A consecutive set of groups with only zeros can be replaced with ::. The above address can be written as: 2001:db8:2231:aaec::4a4a:2100.

Note that the :: should only be used on more than one section of zeros, and can only be used once per address. 2001::ab32:: is not a valid address because we do not know how many sets of zeros are in each :: group. The address could be 2001:0000:0000:ab32:0000:0000:0000:0000 or it could be 2001:0000:0000:0000:0000:ab32:0000:0000.

Though the representation of the numbers is different, the computer still uses binary to do the actual subnetting. The binary math is the same, it is just using larger numbers. There is still a network portion and a host portion of every address.

IPv6 does not use network addresses or broadcast addresses. An address where the host bits are all 0s or all 1s is still valid!

We also do not use subnet masks for IPv6. Everything is written in slash notation. In IPv6 the first 48 bits are used for networking and routing. The next 16 and used to define subnets. The last 64 and used to identify a host.

With IPv6 is that every device can create a unique link local address based on the MAC address of the device. What one does is inset 0xFFEE into the middle of the MAC address. This changes the MAC address to 64-bits from 48-bits. The other thing that needs to happen is to flip the 7th bit. A link local unicast address is fe80::/10

The Quick and Easy

The number of subnetting bits is the new prefix length minus the original prefix length. So there are 4 subnetting bits when a /48 is broken into /52s (52-48=4).

The number of subnets possible with x subnetting bits is 2x. So if we have 4 subnetting bits, then we can create 24=16 new subnets.

::1/128 is the loopback address.
::FFFF:0:0/96 are the IPv4-mapped addresses.
fe80::/10 are the link-local unicast.
2001:db8::/32 are the documentation addresses.
ff00::/8 are multicast addresses

Our subnetting cheatsheet includes IPv6.

Correct IPv6 Notation

IPv6 addresses should be written a certain way. This will make interpreting the addresses faster and easier, both for humans and for computer programs.

Leading zeros must be removed. 2001:0db8::0001 must be written as 2001:db8::1.
"::" must be used to represent the largest number of 16-bit sets of zero as possible.
If there are multiple places where "::" can be used, and the numbers of zeros are the same, use "::" on the leftmost set of zeros
"::" cannot be used to shorten a single 16-bit set of zeros.
Letters in an IPv6 address should be written in lowercase.
To represent port numbers, wrap an IPv6 address in square brackets then followed by a colon and the port number as [2001:db8::1]:80
For more information see RFC5952.

Copyright 2014 SubnettingPractice.com. All rights reserved