In IPv6, there are three types of addresses: unicast, multicast, and anycast. This section gives a (very) high-level overview of these types.
Note
IPv6 does not have a broadcast address. There are other options that exist in IPv6 that deal with this issue, but this is beyond the scope of this article.
Figure 1 diagrams the three types of addresses.
Unicast Addresses
A unicast address uniquely identifies an interface on an IPv6 device. A packet sent to a unicast address is received by the interface that is assigned to that address, Similar to IPv4, a source IPv6 address must be a unicast address.
As shown in Figure 1, there are six different types of unicast addresses:
- Global unicast: A routable address in the IPv6 Internet, similar to a public IPv4 address.
- Link-local: Used only to communicate with devices on the same local link.
- Loopback: An address not assigned to any physical interface that can be used for a host to send an IPv6 packet to itself.
- Unspecified address: Used only as a source address and indicates the absence of an IPv6 address.
- Unique local: Similar to a private address in IPv4 (RFC 1918) and not intended to be routable in the IPv6 Internet. However, unlike RFC 1918 addresses, these addresses are not intended to be statefully translated to a global unicast address. Please see Rick Graziani’s book IPv6 Fundamentals for a more detailed description of stateful translation.
- IPv4 embedded: An IPv6 address that carries an IPv4 address in the low-order 32 bits of an IPv6 address.
Global Unicast Addresses
Global unicast addresses (GUAs) are globally routable and reachable in the IPv6 Internet. The generic structure of a GUA has three fields:
- Global Routing Prefix: The prefix or network portion of the address assigned by the provider, such as an ISP, to the customer site.
- Subnet ID: A separate field for allocating subnets within the customer site. Unlike IPv4, it is not necessary to borrow bits from the Interface ID (host portion) to create subnets. The number of bits in the Subnet ID falls between where the Global Routing Prefix ends and the Interface ID begins.
- Interface ID: Identifies the interface on the subnet, equivalent to the host portion of an IPv4 address. In most cases, the Interface ID is 64 bits in length.
Figure 2 shows the structure of a global unicast address.
Figure 2 Structure of a Global Unicast Address
Link-Local Unicast Addresses
A link-local unicast address is a unicast address that is confined to a single link (a single subnet). Link-local addresses only need to be unique on the link (subnet) and do not need to be unique beyond the link. Therefore, routers do not forward packets with a link-local address.
Figure 3 shows the format of a link-local unicast address, which is in the range fe80::/10
. Using this prefix and prefix length range results in the range of the first hextet being from fe80
to febf
.
Figure 2 Structure of a Link-Local Unicast Address
Note
Using a prefix other than fe80 is permitted by RFC 4291, but the addresses should be tested prior to usage.
Note
To be an IPv6-enabled device, a device must have an IPv6 link-local address. You do not need to have an IPv6 global unicast address, but you must have a link-local address.
Note
Devices dynamically (automatically) create their own link-local IPv6 addresses upon startup. Link-local addresses can be manually configured.
Note
Link-local addresses only need to be unique on the link. It is very likely, and even desirable, to have the same link-local address on different interfaces that are on different links. For example, on a device named Router2, you may want all link-local interfaces to be manually configured to
FE80::2
, whereas all link-local interfaces on Router3 to be manually configured toFE80::3
, and so on.
Note
There can be only one link-local address per interface. There can be multiple global unicast addresses per interface.
Loopback Addresses
An IPv6 loopback address is ::1
, an all-0s address except for the last bit, which is set to 1. It is equivalent to the IPv4 address block 127.0.0.0/8, most commonly the 127.0.0.1 loopback address. The loopback address can be used by a node to send an IPv6 packet to itself, typically when testing the TCP/IP stack.
Table 1 shows the different formats for representing an IPv6 loopback address.
Table 1 IPv6 Loopback Address Representation
Representation | IPv6 Loopback Address |
Preferred | 0000:0000:0000:0000:0000:0000:0000:0001 |
Leading 0s omitted | 0:0:0:0:0:0:0:1 |
Compressed | ::1 |
Note
A loopback address cannot be assigned to a physical interface.
Unspecified Addresses
An unspecified unicast address is an all-0s address (see Table 2), used as a source address to indicate the absence of an address.
Table 2 shows the different formats for representing an IPv6 unspecified address.
Table 2 IPv6 Unspecified Address Representation
Representation | IPv6 Unspecified Address |
Preferred | 0000:0000:0000:0000:0000:0000:0000:0000 |
Leading 0s omitted | 0:0:0:0:0:0:0:0 |
Compressed | :: |
Note
An unspecified address cannot be assigned to a physical interface.
Unique Local Addresses
Figure 3 shows the structure of the unique local address (ULA), which is the counterpart of IPv4 private addresses. ULAs are used similarly to global unicast addresses, but are for private use and cannot be routed in the global Internet. ULAs are defined in RFC 4193.
Figure 3 shows the different formats for representing an IPv6 unspecified address.
Figure 3 Structure of a Unique Local Unicast Address
IPv4 Embedded Addresses
Figure 4 shows the structure of IPv4 embedded addresses. They are used to aid in the transition from IPv4 to IPv6. IPv4 embedded addresses carry an IPv4 address in the low-order 32 bits of an IPv6 address.
Figure 4 IPv4-Mapped IPv6 Address
Note
This is a transition technique for moving from IPv4 to IPv6 addressing. This should not be used as a permanent solution. The end goal should always be native end-to-end IPv6 connectivity.
Multicast Addresses
Multicast is a technique in which a device sends a single packet to multiple destinations simultaneously (one-to-many transmission). Multiple destinations can actually be multiple interfaces on the same device, but they are typically different devices.
An IPv6 multicast address defines a group of devices known as a multicast group. IPv6 addresses use the prefix ff00::/8, which is equivalent to the IPv4 multicast address 224.0.0.0/4. A packet sent to a multicast group always has a unicast source address; a multicast address can never be the source address.
Unlike IPv4, there is no broadcast address in IPv6. Instead, IPv6 uses multicast.
Table 2 shows IPv6 multicast address representation.
Table 2 IPv6 Multicast Address Representation
Representation | IPv6 Multicast Address |
Preferred | ff00:0000:0000:0000:0000:0000:0000:0000/8 |
Leading 0s omitted | ff00:0:0:0:0:0:0:0/8 |
Compressed | ff00::/8 |
The structure of an IPv6 multicast is shown in Figure 5; the first 8 bits are 1-bits (ff) followed by 4 bits for flags and a 4-bit Scope field. The next 112 bits represent the Group ID.
Figure 5 IPv6 Multicast Address
Although there are many different types of multicast addresses, this blog defines only two of them:
- Well-known multicast addresses
- Solicited-node multicast addresses
Well-Known Multicast Addresses
Well-known multicast addresses have the prefix ff00::/12
. Well-known multicast addresses are predefined or reserved multicast addresses for assigned groups of devices. These addresses are equivalent to IPv4 well-known multicast addresses in the range 224.0.0.0 to 239.255.255.255. Some examples of IPv6 well-known multicast addresses include the following:
Address | Use |
ff02::1 | All IPv6 devices |
ff02::2 | All IPv6 routers |
ff02::5 | All OSPFv3 routers |
ff02::6 | All OSPFv3 DR routers |
ff02::9 | All RIPng routers |
ff02:a | All EIGRPv6 routers |
ff02::1:2 | All DHCPv6 servers and relay agents |
Solicited-Node Multicast Addresses
Solicited-node multicast addresses are used as a more efficient approach to IPv4’s broadcast address. A more detailed description is beyond the scope of this article.
Anycast Addresses
An IPv6 anycast address is an address that can be assigned to more than one interface (typically on different devices). In other words, multiple devices can have the same anycast address. A packet sent to an anycast address is routed to the “nearest” interface having that address, according to the router’s routing table.
Figure 6 shows an example of anycast addressing.
Figure 6 Example of Anycast Addressing
Note
IPv6 anycast addressing is still somewhat in the experimental stages and beyond the scope of this article.