IPv6 Features
In this lesson, we'll study IPv6 address types.
IPv6 Address Format & Types
The experience of IPv4 revealed that the scalability of a network layer protocol heavily depends on its addressing architecture. The designers of IPv6 therefore spent a lot of effort defining its addressing architecture RFC 3513. IPv6 supports unicast, multicast and anycast addresses.
Unicast
As with IPv4, an IPv6 unicast address is used to identify one data link layer interface on a host. If a host has several data link layer interfaces (such as an Ethernet interface and a WiFi interface), then it needs several IPv6 addresses. An IPv6 unicast address is composed of three parts:
- A global routing prefix that is assigned to the Internet Service Provider that owns this block of addresses
- A subnet identifier that identifies a customer of the ISP
- An interface identifier that identifies a particular interface on an end-system
As described in the previous lesson, IPv6 addresses are divided into eight 16-bit groups separated by colons. Each group is represented by four hexadecimal digits.
In general, an IPv6 unicast address is structured as shown in the figure below:
In today’s deployments, interface identifiers are always 64 bits. This implies that while there are different IPv6 addresses, they must be grouped in subnets. This could appear as a waste of resources, however using bits for the host identifier allows IPv6 addresses to be auto-configured and also provides some benefits from a security point of view.
In practice, there are several types of IPv6 unicast address.
Provider Independent Addresses
Most of the IPv6 unicast addresses are allocated in blocks under the responsibility of IANA. The current IPv6 allocations are part of the 2000::/3 address block. Regional Internet Registries (RIR) such as RIPE in Europe, ARIN in North-America or AfriNIC in Africa have each received a block of IPv6 addresses that they sub-allocate to Internet Service Providers in their region. The ISPs then sub-allocate addresses to their customers as usual. When considering the allocation of IPv6 addresses, two types of address allocations are often distinguished. The RIRs allocate provider-independent (PI) addresses.
- PI addresses are usually allocated to Internet Service Providers and large companies that are connected to at least two different ISPs.
- Once a PI address block has been allocated to a company, this company can use its address block with the provider of its choice and change its provider at will.
- Internet Service Providers allocate provider-aggregatable (PA) address blocks from their own PI address block to their customers.
- A company that is connected to only one ISP should only use PA addresses.
Disadvantages of Provider Independent Addresses
- The drawback of PA addresses is that when a company using a PA address block changes its provider, it needs to change all the addresses that it uses. This can be a nightmare from an operational perspective, and many companies are lobbying to obtain PI address blocks even if they are small and connected to a single provider.
The typical size of the IPv6 address blocks are:
- /32 for an Internet Service Provider
- /48 for a single company
- /64 for a single user (e.g. a home user connected via ADSL)
- /128 in the rare case when it is known that no more than one end host will be attached.
Unique Local Unicast Addresses
For the companies that want to use IPv6 without being connected to the IPv6 Internet, RFC 4193 defines the Unique Local Unicast (ULA) addresses (FC00::/7).
These ULA addresses play a similar role as the private IPv4 addresses defined in RFC 1918. However, the size of the FC00::/7 address block allows ULA to be much more flexible than private IPv4 addresses. Furthermore, the IETF has reserved some IPv6 addresses for a special usage. The two most important ones are:
-
0:0:0:0:0:0:0:1 (::1 in compact form) is the IPv6 loopback address. This is the address of a logical interface that is always up and running on IPv6 enabled hosts. This is the equivalent of 127.0.0.1 in IPv4.
-
0:0:0:0:0:0:0:0 (:: in compact form) is the unspecified IPv6 address. This is the IPv6 address that a host can use as source address when trying to acquire an official address.
Link-Local Unicast Addresses
The last type of unicast IPv6 addresses is the Link-Local Unicast addresses. These addresses are part of the FE80::/10 address block and are defined in RFC 4291.
- Each host can compute its own link-local address by concatenating the FE80::/64 prefix with the 64 bits identifier of its interface.
- Link-local addresses can be used when hosts that are attached to the same link (or local area network) need to exchange packets.
- They are used notably for address discovery and auto-configuration purposes.
- Their usage is restricted to each link, and a router cannot forward a packet whose source or destination address is a link-local address.
- Link-local addresses have also been defined for IPv4 RFC 3927. However, the IPv4 link-local addresses are only used when a host cannot obtain a regular IPv4 address, e.g., on an isolated LAN.
An important consequence of the IPv6 unicast addressing architecture and the utilization of link-local addresses is that an IPv6 host has several IPv6 addresses. This implies that an IPv6 stack must be able to handle multiple IPv6 addresses. This was not always the case with IPv4.
Anycast Addresses
RFC 4291 defines a special type of IPv6 anycast address. On a subnetwork having prefix , the IPv6 address whose 128-n low-order bits are set to is the anycast address that corresponds to all routers inside this subnet-work. This anycast address can be used by hosts to quickly send a packet to any of the routers inside their own subnetwork.
Multicast Addresses
Finally, RFC 4291 defines the structure of the IPv6 multicast addresses. This structure is depicted in the figure below.
The lower order bits of an IPv6 multicast address are the group’s identifier. The higher-order bits are used as a marker to distinguish multicast addresses from unicast addresses.
-
Notably, the 4 bits flag field indicates whether the address is temporary or permanent.
-
Finally, the scope field indicates the boundaries of the forwarding of packets destined to a particular address.
- A link-local scope indicates that a router should not forward a packet destined to such a multicast address.
- An organization local-scope indicates that a packet sent to such a multicast destination address should not leave the organization.
- Finally, the global scope is intended for multicast groups spanning the global Internet.
Among these addresses, some are well known. For example, all end-system automatically belong to the FF02::1 multicast group while all routers automatically belong to the FF02::2 multicast group.
Feel free to ask any questions related to the lesson in the following widget. Our AI will answer them and help you better understand the topic
Quick Quiz!
In an IPv6 unicast address, if 12 bits are used for the global routing prefix and 64 bits are used for the interface ID, how many are used for the subnet ID?
64 bits
52 bits
12 bits
In the next lesson, we’ll study middleboxes!
Get hands-on with 1400+ tech skills courses.