CO ISOC > Blog > Internet > Introducing IPv6 | Classifying IPv6 Addresses

Introducing IPv6 | Classifying IPv6 Addresses

Bearded IPv6

Previously, in part 1 of this series, you learned the basics of IPv6 address construction and format. Now you can complement that information with this peek into the various types of IPv6 addresses; critical knowledge for anyone looking to understand the mechanics of the new Internet protocol. Go ahead, I know you want to get started:

Classifying IPv6 Addresses

As with IPv4, an IPv6 address serves as an identifier for an interface or group of interfaces. Also like IPv4, IPv6 addresses come in several types, based on how they represent those interfaces. IPv6 has three types of addresses:

  • Unicast: An IPv6 unicast address is used to identify a single interface. Packets sent to a unicast address are delivered to that specific interface.
  • Anycast: IPv6 anycast addresses identify groups of interfaces, which typically belong to different nodes. Packets destined to an anycast address are sent to the nearest interface in the group, as determined by the active routing protocols.
  • Multicast: An IPv6 a multicast address also identifies a group of interfaces, again typically belonging to different nodes. Packets sent to a multicast address are delivered to all interfaces in the group.

There are no broadcast addresses in IPv6. The functions served by broadcast addresses in IPv4 are provided by multicast addresses in IPv6.

The high-order (left-most) bits of an IPv6 address are used to identify its type, as shown here:

Address Type                  Binary Prefix                       Hex Prefix
Unspecified                   0000...0 (128 bits)                 ::/128
Loopback                      000...01 (128 bits)                 ::1/128
IPv4 Mapped                   00...01111111111111111 (96 bits)    ::FFFF/96
Multicast                     11111111                            FF00::/8
Link-Local Unicast            1111111010                          FE80::/10
Unique Local Unicast (ULA)    1111110                             FC00::/7
Global Unicast	(everything else)

Anycast addresses are taken from the global unicast pool. Anycast and unicast addresses cannot be distinguished based on format.

Multicast Addresses

One of the primary changes from IPv4 to IPv6 is that multicast addressing support is improved and expanded in IPv6. Here’s a figure that illustrates the format for IPv6 multicast addresses:

IPv6 Multicast Address Format

IPv6 Multicast Address Format

All network operators need to have a basic understanding of multicast address format and function when working with IPv6. Because there are no broadcast addresses in IPv6; multicast is used in its place, in addition to all of the ways multicast was used in IPv4. The three fields that you must be most familiar with are indicator, scope, and Group ID. These are the fields used by all IPv6 multicast traffic; including routing protocol messages.

The indicator is always 11111111 (FF in hex notation) because this is the high-order bit pattern that indicates that an IPv6 address is a multicast address.

Scope limits the transmission of multicast packets to one of the defined IPv6 scopes. The four possible values are:

  • node-local (1)
  • link-local (2)
  • site-local (5)
  • global (E)

Group ID refers to a multicast group within the given scope. Some examples of assigned multicast groups are:

  • all nodes (1) – valid scope of 1 or 2
  • all-routers (2) – valid scopes are 1, 2 or 5
  • OSPF Designated Routers (6) – only valid with scope of 2
  • NTP (101) – valid in any scope

Here are a few examples of multicast addresses, notice both the scope and group ID of each:

FF02::1      All nodes on the same link as the sender, this address replaces the broadcast function in IPv4.
FF02::6      All OSPF DRs on the same link as the sender.
FF05::101    All NTP servers on the same site as the sender.

To learn more about IPv6 multicast addresses, see: RFC 2375 “IPv6 Multicast Address Assignments,” RFC 3306 “Unicast-Prefix-based IPv6 Multicast Addresses,” and RFC 3307 “Allocation Guidelines for IPv6 Multicast Addresses.”

Global Unicast Addresses

As with IPv4, unicast addresses are the most common type of IPv6 address you will work with. Because of the abundance of addresses available with IPv6, it is very likely that virtually every machine attached to your network will have at least one global unicast address assigned to each interface. (Read that sentence again, if you don’t mind.)

Because of this, all IPv6 address space not currently specified for another purpose is reserved for use as global unicast addresses. Only a single /3 is currently allocated for use however. The IETF (Internet Engineering Task Force) has assigned binary prefix 001 (hex prefix 2000::/3) to IANA (Internet Assigned Numbers Authority) for use on the Internet. This means that all valid global unicast addresses begin with the 2000::/3 prefix, for now.

The format for a typical IPv6 Global Unicast address is illustrated here:

Global Unicast IPv6 Address Format

Global Unicast IPv6 Address Format

  • Global Routing Prefix: The prefix assigned to a site. Typically this is hierarchically structured as it passes from IANA (Internet Assigned Numbers Authority) to the Regional Internet Registry (RIR) to an ISP (Internet Service Provider) or LIR (Local Internet Registry) and then to a customer or a specific customer location. In each of these transactions, a smaller prefix is assigned downstream – creating the hierarchy.
  • Subnet ID: The prefix assigned to a particular link or LAN within the site. In the case of a /48 being assigned to a site, there are 16 bits available for Subnet IDs; this allows a maximum of 65,535 /64 subnet prefixes at that location!
  • Interface ID: All unicast IPv6 addresses (except those which begin with 000) are required by RFC 4291 “IPv6 Addressing Architecture” to have a 64-bit interface identifier in Modified Extended Unique Identifier-64 (MEUI-64) format. Interface IDs must be unique within a subnet prefix and are used to identify interfaces on a link. Because of this, /64 prefixes are the smallest common subnet you will use in IPv6.

For more information on Modified EUI-64 formatted interface IDs, see section 2.5.1 and Appendix A in RFC 4291 “IPv6 Addressing Architecture.

Special IPv6 Addresses

If you re-examine the table of address types near the beginning of this post, you can see there are several special addresses and address groups within IPv6. Some of these will be familiar to you from your work with IPv4 addressing, and some are new in IPv6:

  • Unspecified address (::/128): This all-zeros address refers to the host itself when the host does not know it’s own address. The unspecified address is typically used in the source field by a device seeking to have its IPv6 address assigned.
  • Loopback address (::1/128): IPv6 has a single address for the loopback function, instead of a whole block as is the case in IPv4.
  • IPv4-Mapped addresses (::FFFF/96): A /96 prefix leaves 32 bits, exactly enough to hold an embedded IPv4 address. IPv4-Mapped IPv6 addresses are used to represent an IPv4 node’s address as an IPv6 address. This address type was defined to help with the transition from IPv4 to IPv6.
  • Link-Local unicast addresses (FE80::/10): As the name implies, Link-Local addresses are unicast addresses to be used on a single link. Packets with a Link-Local source or destination address will not be forwarded to other links. These addresses are used for neighbor discovery, automatic address configuration and in circumstances when no routers are present.
  • Unique local unicast addresses (FC00::/7): Commonly known as ULA, this group of addresses is for use locally, within a site or group of sites. Although globally unique, these addresses are not routable on the global Internet. This author looks at ULA as a kind of upgraded rfc1918 (private) address space for IPv6.

For some background on IPv4-mapped IPv6 addresses, see RFC 4038 “Application Aspects of IPv6 Transition.” Also, be aware that there may be security risks associated with using IPv4-mapped addresses. See draft-itojun-v6ops-v4mapped-harmful-02, “IPv4-Mapped Addresses on the Wire Considered Harmful” for more information.

For more information on ULA, read RFC 4193 “Unique Local IPv6 Unicast Addresses.”

But Wait, There’s More!

That’s right, we’re only half-way through this 4-part Introducing IPv6 series, so go check out Part 3: IPv6 Headers (you guessed it, didn’t you). Or you can always take a look at some other IPv6 posts here on dp.

(Photo Credit)

Introducing IPv6 | Classifying IPv6 Addresses is a post from don't panic – One Network Architect's View of Life, the Internet, and Everything.

Leave a Reply