Understanding IPv6 Addressing
Organizations have relied on IPv4 for decades, but the rapid growth of devices and Internet traffic has led to a critical shortage of IPv4 addresses. Many organizations have exhausted their IPv4 address space, hindering their ability to expand and connect new devices to the Internet. While RFC 1918 Private Address Space can be used for internal networks, organizations still need to connect to the public Internet. To address this issue, transitioning to IPv6 is the best path forward. IPv6 offers a vastly larger address space capable of accommodating the exponential growth of connected devices.
Techniques like Network Address Translation (NAT) and IP Proxy have been widely adopted to conserve IPv4 addresses. However, these methods introduce complexities and limitations, such as reduced security and performance. By transitioning to IPv6, organizations can eliminate the need for NAT and simplify their network infrastructure.
In addition to addressing the address shortage, IPv6 offers several other benefits. It provides improved routing efficiency and enhanced security features and supports emerging technologies like the Internet of Things (IoT). By transitioning to IPv6, network engineers can future-proof their networks and ensure they are well-equipped to meet the challenges of the digital age.
IPv6 addressing overview
The American Registry for Internet Numbers (ARIN) is the regional Internet registry for North America. ARIN manages the distribution of Internet number resources, including IPv4 and IPv6 address space and BGP AS numbers. While it is common for organizations to request a /48 block, many larger organizations may opt for /40 or even /32 blocks or greater. A /32 IPv6 Global Unicast Address (GUA) allows for 4.29 billion /64 subnets. With the vast address space available in a single IPv6 block, organizations can easily allocate /64 subnets to their infrastructure and devices without worrying about running out of addresses. This eliminates the need for complex address conservation techniques often used in IPv4 environments.
IPv6 addresses, unlike their IPv4 predecessors, are significantly longer. While IPv4 addresses are 32 bits, IPv6 addresses are a massive 128 bits. This increased size allows for a vastly larger number of unique IP addresses. IPv4 addresses are familiar to many as they are written in dotted decimal notation (e.g., 192.168.1.1). IPv6 addresses, on the other hand, are expressed in hexadecimal notation, which uses a combination of numbers and letters to represent values.
Hexadecimal notation is a base-16 number system. Each digit represents 16 possible values, from 0 to 9 and A to F (10 to 16, respectively). When reading a hexadecimal number, each digit is multiplied by its corresponding power of 16. For example, the hexadecimal number 32B is equivalent to 811 in decimal (3*16² + 2*16¹ + 11*16⁰ = 811).
IPv6 addresses are composed of eight groups of four hexadecimal digits, separated by colons. These groups are often referred to as "hextets." For instance, a typical IPv6 address might look like this:
Clearly, IPv6 has a readability problem. That is unavoidable and the price we pay for a near-infinite pool of IP addresses. However, there are some techniques to shorten IPv6 addresses. The first rule is suppressing zeros, which states that leading zeros within a hextet may be omitted. Similarly, consecutive hextets that are 0 can be replaced with a single colon. This is known as compressing zeros. Using the IPv6 address above, we can suppress the 4th, 5th, 6th, 7th, and 8th hextets to :0:0:0:0:1; we can shorten the address even further by compressing the 4th, 5th, 6th, 7th hextets to ::.
IPv6 subnetting
IPv4 has a significant limitation regarding the number of hosts it can support within a single subnet. A /24 subnet, commonly used for IPv4 networks, can only accommodate 254 host addresses. In contrast, IPv6 /64 subnets offer a virtually unlimited number of host addresses. This abundance of addresses makes IPv6 much more flexible and simplifies address planning.
The IPv6 address depicted above is an example of an IPv6 GUA assigned by ARIN with a block of 2000:1000:1000:0000:0000:0000:0000:0000/48 or 2000:1000:1000::/48. Because it is a /48, the first three hextets are the fixed block assigned by ARIN to us; the remaining eight hextets belong to us, shown below as "Assigned IPv6 block".
Though you can choose any mask length, the most common and easiest method of subnetting IPv6 is to assign a /64 IPv6 mask. A 64-bit mask reserves the entire fourth hextet for subnets and the rest for hosts. By allocating the fourth hextet, or 16 bits, to subnets, that gives us 65,536 available subnets (2^16 = 65,536). This is comparable to having a Class A IPv4 address, allowing for 65,536 subnets.
IPv6 address space allocation
While IPv4 infrastructure addresses are often assigned using /30 or /31 subnets to conserve addresses, IPv6 /64 subnets can be further subdivided if needed. For example, a /64 allocation block can be further subdivided into /127 subnets if address conservation space is a concern. However, the simplicity of using /64 subnets makes it the most straightforward approach.
Using the example from our Deploying IPv6 with ISIS lab, let's look at a typical method for subnetting and assigning IPv6 addresses to loopbacks and interfaces. Using our address space from above, we will assign a /128 address to each router's loopback interface and a /64 for each point-point link. A /128 in IPv6 is equivalent to a /32 in IPv4, providing one host address. We chose the 0 subnet 2000:1000:1000:0000::/64 to be subdivided into/128 addresses for our Loopback interfaces.
You can choose whatever you like for the individual point-to-point interface addresses on the routers. We continue allocating subnets for our point-to-point interfaces, starting at subnet 1 and counting upwards. In our lab environment, we use the router number for the host address for ease of readability. Below is an example of the P4 to P5 point-to-point link in the lab that we allocated subnet 3.
In addition to GUA addressing, IPv6 has Unique Local (ULA) addressing and a Link-Local Addressing (LLA) feature. ULA is an IPv6 address similar to IPv4 RFC 1918 Private Address Space intended for use in local networks. ULA addresses like RFC 1918 addresses are routable only within the organization or site using them and are not meant to be forwarded on the public Internet. IPv6 Link-Local Addresses (LLA) are a type of IPv6 address that is used for communication between devices on the same local network (link). These addresses are randomly generated from a formula involving the unique interface MAC address and automatically configured. They are necessary for various network operations, such as neighbor discovery and other local network communication tasks. Link-local addresses also play a big part in SRv6, which we will discuss in a future article.
The transition to IPv6 is a critical step for organizations to adapt to the ever-increasing demand for IP addresses. By offering a vastly larger address space, IPv6 addresses the limitations of IPv4 and enables the seamless connectivity of billions of devices. While IPv6 addresses may appear complex, the underlying concepts are similar to IPv4. By understanding the fundamental principles of IPv6 addressing, subnetting, and address allocation, network engineers can effectively plan and deploy IPv6 networks. Organizations embracing IPv6 can unlock the Internet's full potential and ensure a future-proof network infrastructure.