This blog post covers the following CCNA blueprint topics:
1.9 Compare IPv6 address types
- 1.9.a Global unicast
- 1.9.b Unique local
- 1.9.c Link local
- 1.9.d Anycast
- 1.9.e Multicast
- 1.9.f Modified EUI 64
The article content can be useful in preparation for other certification exams and IPv6 gradually becomes as important as IPv4.
Address Format
IPv6 addresses are 128-bit long. An address is divided into 8 groups each containing 4 hexadecimal digits. Groups are separated from each other by colons. Each group is 16-bit long and called hextet.
Hexadecimal digit is called a nibble (4-bit long, half-byte) and can be any number between 0 up to letter F. Figure 1 displays the difference between IPv4 and IPv6 address formats and terms.
IPv6 addresses are much longer in size than IPv4 addresses. Zeroes in the address can compress to make it more readable using the following rules:
- Leading zeroes within a hextet can be removed. For example, 00FC can be compressed to FC. Using this rule, 0000 can be compressed to 0, as it requires at least a single-digit to be preserved. The IPv6 address from Figure 1 can be compressed to FE80:0:0:0:C4A8:D1BF:7583:1166.
- Hextets of all zeroes can be replaced with double-colon once. The address from Figure 1 can be compressed as FE80::C4A8:D1BF:7583:1166. Only one group of zero-hextets can be replaced with double-colon.
IPv6 addresses use prefix notation similar to IPv4 CIDR (Classless Inter-Domain Routing) to identify subnet portion of the address. For example,
2001:C3A9:D1BF:7423:2345:112A:BCDE:F119/64
is part of the subnet:
2001:C3A9:D1BF:7423:0:0:0:0/64
Address Types
There are 3 types of IPv6 addresses:
- Unicast addresses are allocated to a single device. Traffic sent to a unicast address is delivered only to this interface.
- An anycast address can be assigned to many devices at the same time. Traffic sent to an anycast address will be delivered to the closest device.
- Multicast. The address associated with multiple hosts and traffic sent to a multicast address delivered to many devices at the same time.
Unicast and anycast use the same IPv6 address space and multicast has its own dedicated prefix range.
In comparison to IPv4, there are no broadcast addresses in IPv6, which used to represent the delivery of traffic to all interfaces. Multicast delivery is now replacing this functionality.
Address Space
IPv6 address space is managed by Internet Assigned Numbers Authority (IANA). Current address space allocation is available via this URL. The special-purpose address registry is available here.
Figure 2 demonstrates how address IPv6 address blocks are distributed proportionally to the full address space. Global Unicast address space (2000::/3) is the block that IANA uses for the current allocation and its size should provide enough addresses in the foreseeable future. For example, the entire IPv4 address space would be much smaller than a pixel in Figure 2.
Unicast Address Types
0000::/3
Addresses in 0000::/3 range contain several reserved addresses, such as an unspecified address, loopback, and IPv4-mapped addresses.
Unspecified address, 0:0:0:0:0:0:0:0 or :: means that the address is not present. It cannot be used as a destination address in any packets, however, it is used as a source when a host doesn’t have an address allocated.
Loopback address is allocated address of 0:0:0:0:0:0:0:1/128 or ::1/128. As in IPv4, this address represents the host itself. It cannot be assigned to any of the physical interfaces. As a result, it will not be seen outside of the host, and routers will not forward packets sent to this address.
IPv4-mapped IPv6 addresses are used in Dual-Stack (IPv4/IPv6) systems, so IPv6 application can recognize packet delivered to IPv4 address. For example, packet going to IPv4 address 1.2.3.4 will be mapped to IPv6 address of 0:0:0:0:0:FFFF:1.2.3.4 or ::FFFF:1.2.3.4.
Figure 3 displays the IPv4-mapped IPv6 address format. For all diagrams in this post, black dotted-line annotations mean that the value is static. Yellow dotted-line annotations mean that the value is variable.
IPv4-compatible addresses are another way of encoding IPv4 within IPv6 address. However, they are deprecated and IPv4-mapped addresses should be used instead.
2000::/3
Addresses in 2000::/3 range is what called Global Unicast Address space. The current allocation to registries is listed here.
The format of addresses in this range is shown in Figure 4. Global Unicast Address starts with binary 001 and the first digit can be either 2 or 3.
The first part of the address is variable-length Global Routing Prefix, which can be allocated to a site. It follows by variable-length Subnet ID for allocation within that site. The second half of the address (64-bits) is used by interface ID. Interface ID must be unique on the subnet and are derived from the hardware (MAC) address of the device. The resulting format is called modified EUI-64.
The process of deriving address from MAC address is displayed in Figure 5.
E000::/3
The last /3 block is e000::/3. It contains Unique-Local Addresses, Link-Local Unicast Addresses, and Multicast Addresses.
Unique Local Addresses can be used within a site or between multiple sites or organizations. They are not routable on the Internet. They have very similar features as RFC1918 private IPv4 addresses. What makes Unique Local different, is that they are designed to be unique most of the time. Part of the address named Global ID is a 40-bit pseudo-random number that ensures that there is a very small probability of having the same address range as the other party.
The allocated range for Unique Local Addresses is FC::/7. However, the 8th bit of the address is a flag. When it has a value of 1 it means that the address is locally defined. This is the only value currently defined, so all addresses will start with FD.
As displayed in Figure 6, Unique Local Address consists of 3 parts: Global ID, Subnet ID, and an Interface ID. A single Global ID prefix can accommodate more than 65000 subnets.
Link-Local IPv6 Unicast Addresses are designed to be used on a single layer-2 domain. They must not appear as the source or destination address for packets traversing routers. Link-Local Addresses are used for local traffic, such as automatic address configuration and neighbor discovery.
The format of the Link-Local IPv6 Unicast Address is shown in the Figure 7.
Multicast Addresses
The multicast address format is shown in Figure 8. The first 8 bits are always 1s (FF). Next 4 bits are reserved for flags followed by 4 bits representing group scope.
The flag bits (0RPT) are shown in Figure 9. The first bit (left-most or high-order) is always 0.
R-flag, if set to 1, means Rendezvous Point address is encoded within the group address.
P-flag means that it is unicast prefix-based allocation. When an entity receives Unicast Global address allocation, it gets delegated a corresponding multicast range as well. When P-Flag is set to 1, multicast address contains encoded unicast prefix of owner-organization.
T-flag stands for transient. If set to 1, the address is non-permanent. If set to 0, the address is well-known and has been permanently assigned by IANA.
Scope bits define how far multicast traffic can propagate. Table below shows some of the scopes defined:
Scope bits | Hex | Scope |
0001 | 1 | Interface-Local |
0010 | 2 | Link-Local |
0100 | 4 | Admin-Local |
0101 | 5 | Site-Local |
1000 | 8 | Organization-Local |
1110 | E | Global |
There are several reserved multicast addresses. The next table shows some of these addresses.
Address | Description |
---|---|
FF02:0000:0000:0000:0000:0000:0000:0001 | All Nodes (Link-Local) |
FF02:0000:0000:0000:0000:0000:0000:0002 | All Routers (Link-Local) |
FF02:0000:0000:0000:0000:0001:FFXX:XXXX | Solicited-Node Address (XX:XXXX – last 24 bits of Unicast Address) |
FF3S:0000:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX | Source-Specific Multicast (FF3S::/32). S – is scope, X – group address bits |