8 Steps to Understanding IP Subnetting

Step 8 - IPv6 to the Rescue

Obviously, the 32-bit IP address has a limited number of addresses and the explosion of interconnectivity has proved that there are just not enough IPv4 addresses to go around. The answer to future growth lies in the IPv6 addressing scheme. This is more than just the big brother to IPv4 in that it not only adds a significant number of addresses to the IP addressing scheme but eliminates the need for CIDR and the network mask as used in IPv4.

IPv6 increases the IP address size from 32 bits to 128 bits. A 128-bit number supports 2128 values, or 340,282,366,920,938,463,463,374,607,431,768,211,456 possible IP addresses. This number is so big there is not even a name for it.

Even the text representation of IPv6 is different from that of IPv4, although it does have a similar-looking dotted decimal look. You will see an IPv6 address written one of three ways:
  • Preferred
  • Compressed
  • Mixed

Preferred IPv6 Addressing Notation

The preferred form is written using hexadecimal values to refer to the 128-bit numbers in each address segment separated by a colon. It would be written like X:X:X:X:X:X:X:X, where each X consists of four 16-bit values. An example would be:

2001:0db8:85a3:0000:0000:8a2e:0370:7D34

Each of the eight sections of an IPv6 number separated by the colons is written as a hexadecimal number which, when translated to decimal value, would range between 0 and 65,535. So where IPv4 text representations of addresses use decimal numbers, IPv6 uses hexadecimal. It really does not matter though - both boil down to binary numbers, which we covered in detail in Section 2.

The following illustration shows how the text representation of an IPv6 address written in hexadecimal is translated into decimal and binary values.



Compressed IPv6 Addressing Notation

The compressed form simply substitutes zero strings with double colons to indicate the zeros are "compressed". For example, the above address in compressed notation would become:

2001:0db8:85a3::8a2e:0370:7D34

There are some rules to follow when doing this zero substitution. First, a substitution can only be done on one "section," or a full 16-bit group; second, the double colon can only be used one time in any given address. There is one other slightly confusing consideration: a double colon automatically suppresses neighboring leading or trailing zeros in an address. Therefore, the above address only indicates one set of double colons as a compressed IPv6 address even though there are two sets of zeros.

Mixed IPv6 Addressing

The mixed addressing notation is useful in environments using both IPv4 and IPv6 addresses. A mixed address would look like X:X:X:X:X:X:X:X:D:D:D:D, where "X" represents the hexadecimal values of the six highest-order 16-bit components of an IPv6 address, and"D" represents an IPv4 value that would plug into the four lower-order values of an IPv6 address.

IPv6 Routing and Prefix Notation

IPv6 does not use subnet masks but does have a means of indicating subnets that is similar to CIDR. IPv6 routing is based on a prefix length as well where the prefix length represents the bits that have fixed values or are the bits of the network identifier. For example, 2001:0db8:85a3::8a2e:0370:7D34/64 indicates the first 64 bits of the address are the network prefix. Prefix notation can also be used to indicate a subnet identifier or a larger network.

Share this:
Written by Dale Janssen
Profile Picture of Dale Janssen
Dale Janssen is a co-founder of Techopedia and has been involved in the IT Industry for most of his career. He purchased his first computer in 1978 - an Ohio Scientific computer with a whopping memory size of 48K, operating a relic of an operating system called CPM. In fact, his roots go so far back in the computing biz that when he graduated from university, there was no such thing as a computer science department.