What are IPv6 Addresses?

What are IPv6 Addresses?

The Internet (SERIES) - Blog #3

Background

In the previous blog I talked about IPv4 Addresses. There are two types of IP addresses. The old IPv4 and the new IPv6. In the previous blog, we talked about IPv4. Now we're going to talk about IPv6.

The Problem with IPv4

When the original creators created IPv4, they didn't expect a huge increase in electronic devices accessing the internet. Hence IPv4 could only support 4,294,967,296 (4 billion) IP addresses. That sounds like a lot but considering there are twice as many humans as that and there are about 21.5 billion devices that connect to the internet on Earth. \( 21,500,000,000 > 4,294,967,296 \) . So clearly, something had to be done, more IP addresses were needed. That's where IPv6 comes in.

IPv6 Text popping

Introducing IPv6

This new version of IP Addresses gives us... 340,282,366,920,938,463,463,374,607,431,768,211,456 IP addresses or about 340 undecilion IP addresses.

Quick Maths Lesson

Everyone knows numbers go ones, tens, hundreds, thousands, millions, billions, and trillions, but there's more...
After a trillion we have...
Quadrillions (1,000,000,000,000,000)
Quintillions (1,000,000,000,000,000,000)
Sextillions (1,000,000,000,000,000,000,000)
Septillions (1,000,000,000,000,000,000,000,000)
Octillion (1,000,000,000,000,000,000,000,000,000)
Nonillions (1,000,000,000,000,000,000,000,000,000,000)
Decillions (1,000,000,000,000,000,000,000,000,000,000,000)
Undecillions (1,000,000,000,000,000,000,000,000,000,000,000,000)

Back to IPv6

So as you can see, there are ALOT of IPv6 Addresses. But other than more IP addresses, IPv6 also brings some other new features.

IPv4 VS IPv6

First, let's look at an IPv4 address compared to an IPv6 address.

IPv4 VS IPv6

You may look at the IPv6 address and be all stressed out about how long it is. Don't worry, let's break it down.

Observations

Let's look at some observations you may see. You may see that IPv6 magically has letters!? Or that the IPv6 address is like 10000 times longer than the IPv4 address. The sections of the IPv6 address are split by colons (:) while the IPv4 sections are split by dots or periods (.). So let's address (get it) these observations shall we?

Octets and Hextets

In IPv4 each of the "parts" are called octets. In IPv6 the parts are called hextets.

Octets and Hextets

Each IPv6 character (digits or letters) is 4 bits each and hextets are 16 bits each. In total, an IPv6 address is 128 bits long (an IPv4 address is just 32 bits).

Periods and Colons

Another thing is that IPv4 uses periods to separate octets while IPv6 uses colons to separate hextets.

There are letters now?

Another thing you may have noticed is that IPv6 has letters. Unlike IPv4 which is in Base 10 (uses only digits 0-9), IPv6 is Hexadecimal meaning it can use the Base 10 numbers of 0 - 9 and letters a - f! We use letters a - f because double-digit numbers aren't possible. Take an IP address for example, "20" will always be interpreted as "2" and "0" not "20". So we use letters a - f for numbers 10 - 15.

Hexadecimal

Subnet Mask

Just like IPv4, IPv6 has a network and a host section. Unlike IPv4, IPv6 doesn't use a subnet mask that looks similar to 255.255.0.0. All IPv6 addresses have a /## (# representing a digit each) at the end of the IP Address. Confused? I'll provide an image.

IPv6 Subnet Mask

The number at the end of the IPv6 address specifies how many bits are for the network section. Here 64 bits are for the network section. 64 bits are conveniently half of an IPv6's 128-bit long address.

Network, Host, and Subnet Mask labeled

These types of addresses (/64 addresses) are common among IPv6 addresses. Keep in mind each character (digit or letter) is 4 bits and each hextet is 16 bits.

Shortening the IPv6 Addresses

I bet everyone reading this thinks IPv6 addresses are VERY long. So there are a few things we can do to shorten it.

Double-Colons

First thing is to remove two adjacent hextets of repeating zeros and like this

Example for removing two hextets of repeating zeros

There is one catch with this. The double-colon may only be done once in an IPv6 address, as the computer would get confused.

IPv6, multiple ::'s, computer get confused

Leading Zeros

Another way to shorten IPv6 addresses is to remove any leading zeros of any of the hextets.

Removing the leading zeros of the hextets

For the hextet with one zero (1010:ab1::c222:0:e444:abcd), that zero can't be removed as it'll become a "::", and we already have a "::" in our IP address. So we can't do that.

IPv6 Parts

IPv6 Parts labeled

There are three main parts to an IPv6 address. Ignoring the "Global Unicast" text at the top (don't worry we'll get to that later), the first part is called the "Global Prefix". It's the part your ISP gives you. It is a minimum of 48 bits long. Next is the Subnet ID it is 16 bits long and allows for 65,000+ subnets. Lastly, this leaves us with a 64-bit Interface ID AKA the host section.

IPv6 Address Types

Like IPv4, IPv6 addresses have different types; however, IPv6 doesn't have public and private addresses as it has so many IP addresses.

Let's look at some of them.

IPv6 Types

Global Unicast

Like the one we just saw, Global Unicast Addresses can be used publicly over the internet and typically begin with 2000:: or 3000::. The /3 means that the first 3 bits are used to identify the network section. It is like the IPv4 Public Addresses.

Unique Local

The Unique Local Address can only be used within your local network and are like IPv4 Private Addresses. They begin with FC00:: or FD00::. The /7 indicates their first 7 bits are used to identify the network section.

The Link Local Address is similar to the Unique Local Address in that it's not publicly usable, but it's used only in a specific area of a network. It begins with FE80::. The /10 indicates its first 10 bits are for the network section.

Multicast

Multicast Addresses are for a group of devices listening for that Multicast address. It's like the IPv4 broadcast address, but the broadcast addresses were for all devices on a network. Broadcast addresses were scrapped and replaced with Multicast addresses. Multicast addresses start with FF::. The /8 indicates the first 8 bits are for the network section.

Anycast

Lastly, an Anycast address is special as this IP address can be publicly assigned to multiple devices on a network, and whenever data is sent to that anycast address, it will be sent to the nearest device with that anycast address. Anycast addresses don't have their own range or beginnings so they are the same as Global Unicast with 2000::/3. Meaning they start with 2000:: with the /3 representing the first three bits are for the network section.

ย