During the year of 1994, the Internet Engineering Task Force (IETF) initiated the development of the Internet Protocol version 6 (better known as IPv6). In December 1998, the first draft became a standard for the IETF, which eventually was ratified as the Internet Standard on July 14, 2017.
The main reason for the development of IPv6 was to overcome the problem of IPv4 address exhaustion. With this issue in mind, the IETF also optimized the protocol in the general sense.
To understand the need for IPv6 and why it is the successor of IPv4, we’ll have to cover IPv4 briefly.
First deployed in 1983 by Advanced Research Projects Agency Networks (ARPANET), IPv4 is still the most used routed protocol, despite its successor IPv6.
Here are a few facts about IPv4:
- IPv4 uses a 32-bit (232) address space, meaning that a total of 4,294,967,296 unique IP addresses can be assigned to hosts.
- There are a number of special blocks reserved for private networks (Class A, B, and C), roughly 18 million addresses, and 270 million are reserved for multicast addresses.
- IPv4 is written in a decimal notation where each octet is separated by a dot (i.e, 22.214.171.124).
- Internet Protocol Security (IPSec) is optional in IPv4, and the minimum fragmented packet size is 576 bytes.
- Network address translation (NAT) is used to further limit IP address exhaustion.
With the rapid growth of internet devices—otherwise known as the Internet of Things (IoT)—around the globe, more IP addresses are required for these devices to exchange data. Think about mobile phones, smartwatches, refrigerators, washing machines, smart TVs, and other items that require an IP address. All of these devices are nowadays connected to the internet and identified by a unique IP address. In this section, we’ll focus on IPv6, its features, and why it will be the Internet Protocol standard.
Before jumping into details, there are a few key features IPv6 incorporates:
- IPv6 uses 128-bit (2128) addresses, allowing 3.4 x 1038 unique IP addresses. This is equal to 340 trillion trillion trillion IP addresses.
- IPv6 is written in hexadecimal notation, separated into 8 groups of 16 bits by the colons, thus (8 x 16 = 128) bits in total. An IPv6 address representation looks like this:
- IPv6 can be configured manually, using Stateless Address Auto Configuration (SLAAC), or DHCPv6.
- IPv6 has a minimum packet size of 1280 bytes consisting of a fixed 40-byte base header and 1240 bytes of payload (user data).
- IPv6 is supported by many operating systems like Linux, macOS, Solaris, (Free, Open, and Net) BSD, and Windows.
Note that IPSec was once designed for IPv6 as a mandatory requirement. Today, it can be optionally used with IPv6. See RFC 6434. IPSec provides authentication and encryption using Authentication Headers (AH) and the Encapsulating Security Payload (ESP).
An IPv6 address is written in hexadecimal notation separated by the colon symbol (:) as shown here:
The above addresses could also be written as:
where consecutive zeros are eliminated and replaced by a double colon sign (::). It is important to note that if an address consists of multiple all-zero fields and those zeros occur in different parts of the IP, then the leftmost zeros are the ones that are compressed.
Let’s illustrate this with an example:
|IPv6 address variant||IPv6 address notation|
|IPv6 fully written||2001:0db8:0000:0000:34f4:0000:0000:f3dd/64|
|IPv6 further simplified||2001:db8::34f4:0:0:f3dd/64|
However, writing the IP address as 2001:db8::34f4::f3dd/64 will make it invalid since double-colon can be applied only once in the address (leftmost all-zeros).
The IPv6 address consists mainly of two 64-bit segments where the higher part of the bits is classified as the network part, and the lower 64 bits are classified as the client ID. The network part is subdivided into the Global Unicast Address (GUA) and subnet ID. This information can be simplified by the following picture:
It is worth noting that IPv6 has no notion of subnet masks like IPv4 has. Rather, a Classless Inter-Domain Routing (CIDR) notation is used. Examples are:
From the end-user/end-site perspective, the network part (or network ID) is provided by your Internet Service Provider (ISP) and is static. If your ISP aggregates a /48 prefix to you, then 16-bit addresses could be used to create 216 (65535) subnets, where each subnet will be able to support 26418,446,744,073,709,551,616 or 1.844674407×10¹⁹ IP addresses.
Now we know the basics of IPv6, let’s see what address types exist out there.
IPv6 address types
The following address types exist in the IPv6 ecosystem:
The Unicast address type is probably the most important one. It distinguishes itself by these sub-type addresses:
- Global Unique Addresses: Globally reachable. Examples:
- Link-local addresses: Required on every IPv6-enabled interface, but packets cannot leave or enter the interface. This address is mostly used by software applications and starts with:
- Site-local addresses: Deprecated, see RFC 3879.
- Loopback address: This is the address we know as 127.0.0.1/8 in IPv4, and it is written as follows in IPv6:
- Unique local addresses: Routable only within the scope of the organization. These addresses are not routable globally. IPv4 equivalent private ranges are 10.0.0.0/8, 192.168.1.0/24, and so on. Unique local addresses in IPv6 start with:
Multicast is the technique used to send a packet from one source (or multiple sources) to multiple destinations (receivers). In its simplest form, a multicast flow is as follows. First, a host sends an ICMPv6 packet (host solicitation) to the router(s) multicast group. Then, a router responds to this request and sends a Router Advertisement (RA) packet back to the client along with configuration parameters:
The multicast address range is ff00::/8. The first 8 bits are always ff (in binary 1111 1111).
The Anycast address behaves similarly to the Multicast address, except for the following. A packet sent from a client goes to a single selected destination and not to the whole group identified by the same destination address. The receiving endpoint is selected based on the least expensive routing metric. The router uses the equal-cost multi-path to do this:
Eventually, we will all be using IPv6. The sooner you understand how this address space works, and how to implement IPv6 in your own networks, the better.