Hi there, and welcome back to this series on IPv6. In the last article, we introduced IPv6, highlighting the differences between IPv6 and IPv4. We also looked at the textual representation of IPv6 addresses, the shortcut rules for these addresses and recommendations on the textual representation of IPv6 addresses. In this article, we will discuss the different IPv6 address types.
IPv6 Address Types
IPv6 defines several address types, including unspecified, loopback, unicast, anycast, and multicast. It may seem a bit much but, in fact, there is not much difference from the IPv4 address counterparts. Let’s take them one after the other:
Unspecified—The unspecified IPv6 address is made up of all 0s (0:0:0:0:0:0:0:0) and, from what we learned in the last article, we can represent it as ::/128. The /128 is the prefix-length similar to subnet masks in IPv4. We also have the unspecified address in IPv4, which is simply 0.0.0.0. Can you see the similarity? This address cannot be assigned to a node nor can it be used as the destination address of IPv6 packets. An example of the use of this address is in the source address field of IPv6 packets sent by a newly initializing host that does not have an IPv6 address yet.
Loopback—We should all be familiar with the IPv4 loopback address, mostly represented as 127.0.0.1 (even though the entire 127.0.0.0/8 block is reserved for loopback addresses). The loopback address is used for “self” communication, and due to its usefulness, it also finds application in IPv6. The IPv6 loopback address is represented as 0:0:0:0:0:0:0:1 or simply ::1/128. Notice that although an entire /8 block was reserved for loopback addresses in IPv4, we really only used just one (127.0.0.1), so only one address was reserved for loopback purposes in IPv6.
These two addresses (unspecified and loopback) are part of the special-use IPv6 addresses. You can refer to RFC 5156 for a full list of special-use IPv6 addresses.
Unicast—Unicast (IPv4) addresses also have the same meaning in IPv6, although a new concept of “scope” has been introduced, which we will talk more about in the next article. Unicast IPv6 addresses identify a single interface within the scope of that unicast address. Private and Public IPv4 addresses are the equivalent of unicast IPv6 addresses, although there are different types of unicast addresses as we will see later in this article.
Anycast—This is something we are not familiar with from IPv4. Anycast IPv6 addresses are actually unicast IPv6 addresses that are assigned to more than one interface (typically interfaces on different nodes). Traffic destined to an anycast address is delivered to the NEAREST interface having that address – nearest as seen by the routing protocol.
Multicast—Multicast is also familiar from IPv4 and is used for one-to-many communication. A multicast IPv6 address identifies a group of interfaces (typically interfaces on different nodes).
Generally speaking, you can say that, in IPv4, we have unicast, multicast, and broadcast but, in IPv6, we have unicast, anycast, and multicast.
You have seen the word “node” appear several times in this article, so let’s clarify this term and others with a diagram.
In IPv6, there are two types of unicast addresses: link-local and global unicast. There used to be three types, the third being site-local, but this site-local unicast address has now been deprecated (see RFC 3879 for more details). A better alternative to site-local addresses has been implemented called unique local IPv6 unicast addresses as detailed in RFC 4193.
Link-Local IPv6 Unicast Addresses
Remember the 169.254.0.0/16 in IPv4? The link-local IPv6 unicast addresses are the equivalent of those addresses. These link-local addresses begin with the bits 1111111010 i.e. fe80::/10.
Note: We cannot represent this as fe8:: because, based on shortcut rules, fe8:: will be 0fe8:: in full form.
Link-local addresses are used for communication on a single link, i.e., communication between neighboring nodes for automatic address configuration, neighbor discovery, and so on. The format for link-local unicast addresses is as shown below (taken from the RFC):
For example, I can view a link-local IPv6 unicast address on Windows by issuing the ipconfig command in command prompt.
The full form of that IPv6 address is fe80:0000:0000:0000:0511:db33:68f3:29a0. We will discuss what the %12 means in the next article.
Site-Local IPv6 Unicast Addresses
As mentioned before, site-local unicast addresses are deprecated and new implementations should not support these addresses; however, existing implementations may continue to use site-local IPv6 unicast addresses. Site-local IPv6 unicast addresses are equivalent to the private IPv4 addresses, i.e., 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. There were designed to be used within a site (e.g., an organization) without needing a global prefix (i.e., not routable on the Internet).
The format for site-local unicast addresses is similar to link-local unicast addresses, except that site-local unicast addresses begin with bits 1111111011 i.e. fec0::/10 as shown below:
Unique Local IPv6 Unicast Addresses
Due to some issues with the site-local IPv6 unicast addresses, it was agreed that these addresses should be removed. Unique local IPv6 unicast addresses defined in RFC 4193 are used for similar purposes, which is to provide globally unique (to a high probability) IPv6 unicast addresses for local communication, i.e., not routable on the Internet. The format for these addresses is as follows:
All unique local IPv6 unicast addresses have a fixed value of 1111110 in the prefix field, i.e., fc00::/7. What makes these addresses “unique” is the way the “Global ID” is generated—by using a pseudo-random algorithm; you can read more about this in the RFC.
Global Unicast Addresses
Every other unicast IPv6 address is a global unicast address, except those that fall under special uses. Global unicast addresses are equivalent to public IP addresses in IPv4. The format of the global unicast addresses is as shown below:
Currently, IANA is delegating global unicast addresses under the 2000::/3 prefix. Therefore, the format for these delegated addresses then becomes:
There are certain subtypes of global unicast addresses, such as IPv4-compatible IPv6 addresses and IPv4-mapped IPv6 addresses, but I won’t go into details about those here. You can refer to RFC 3587 for more information on global unicast IPv6 addresses.
Anycast IPv6 addresses are from the same address space as unicast IPv6 addresses; as such, these addresses are not distinguishable from unicast addresses. Therefore, an anycast address is a unicast address that has been assigned to more than one interface.
Multicast addresses are also not new to us, as we have IPv4 multicast addresses in the 126.96.36.199/4 block. IPv6 multicast addresses begin with bits 11111111 i.e. ff00::/8. The format for multicast addresses is as follows:
The flgs field is a set of 4 flags (0, R, P, T) and the scop field defines the scope of the multicast group. We will talk about scope in detail in the next article. The scope value can be any of the following:
0 reserved 1 Interface-Local scope 2 Link-Local scope 3 reserved 4 Admin-Local scope 5 Site-Local scope 6 (unassigned) 7 (unassigned) 8 Organization-Local scope 9 (unassigned) A (unassigned) B (unassigned) C (unassigned) D (unassigned) E Global scope F reserved
The same way we have common reserved multicast groups in IPv4 e.g. 188.8.131.52 and 184.108.40.206, we also have reserved multicast groups in IPv6 with an addition of “scope”. For example, FF01::1 identifies the group of IPv6 nodes within the interface-local scope.
Hint: FF01 = 1111111100000001; therefore the scop field has a value of 0001, which represents the interface-local scope from our list of values above.
Consequently, FF02::1 identifies the group of IPv6 nodes within the link-local scope.
I know we have discussed a lot of things in this article, but let’s use the table below to summarize the key points:
Whew! That has been a lot of text but I like how we summarized it with the table above. In this article, we have discussed IPv6 address types including unicast (one-to-one), multicast (one-to-many), and anycast (one-to-one-of-many). We have also seen the different types of unicast IPv6 addresses.
One thing we have skipped up till this point is the issue of “scope,” which will be the topic of our discussion in the next article. This book, IPv6 for IPv4 Experts, also has some wonderful explanation of IPv6. I hope you have found this article helpful and I look forward to the next article in the series.
References and Further Reading
RFC 4291: IP Version 6 Addressing Architecture: http://tools.ietf.org/html/rfc4291
Introduction to IPv6: http://technet.microsoft.com/library/bb726944.aspx
RFC 3879: Deprecating Site Local Addresses: http://tools.ietf.org/html/rfc3879
RFC 4193: Unique Local IPv6 Unicast Addresses: http://tools.ietf.org/html/rfc4193
RFC 3587: IPv6 Global Unicast Address Format: http://tools.ietf.org/html/rfc3587
RFC 5735: Special Use IPv4 Addresses: http://tools.ietf.org/html/rfc5735
RFC 5156: Special-Use IPv6 Addresses: http://tools.ietf.org/html/rfc5156
IPv6 for IPv4 Experts: https://sites.google.com/site/yartikhiy/home/ipv6book