Networking‎ > ‎IPv6‎ > ‎


IPv6 Addressing Architecture - RFC 4291

IPv6 Addressing

IPv6 addresses are 128-bit identifiers for interfaces and sets of interfaces.

Unicast: An identifier for a single interface. A packet sent to a unicast address is delivered to the interface identified by that address.

Anycast: An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to an anycast address is delivered to one of the interfaces identified by that address (the "nearest" one, according to the routing protocols' measure of distance).

Multicast: An identifier for a set of interfaces (typically belonging to different nodes). A packet sent to a multicast address is delivered to all interfaces identified by that address.

There are no broadcast addresses in IPv6, their function being superseded by multicast addresses.
In IPv6, all zeros and all ones are legal values for any field, unless specifically excluded.

Addressing Model

IPv6 addresses of all types are assigned to interfaces, not nodes.An IPv6 unicast address refers to a single interface. Since each interface belongs to a single node, any of that node's interfaces' unicast addresses may be used as an identifier for the node.

All interfaces are required to have at least one Link-Local unicast address. A single interface may also have multiple IPv6 addresses of any type (unicast, anycast, and multicast) or scope.

A unicast address or a set of unicast addresses may be assigned to multiple physical interfaces if the implementation treats the multiple physical interfaces as one interface when presenting it to the internet layer. This is useful for load-sharing over multiple physical interfaces.

Currently, IPv6 continues the IPv4 model in that a subnet prefix is associated with one link. Multiple subnet prefixes may be assigned to the same link.

Text Representation

1. The preferred form is x:x:x:x:x:x:x:x, where the 'x's are one to four hexadecimal digits of the eight 16-bit pieces of the address.

2. The use of "::" indicates one or more groups of 16 bits of zeros. The "::" can only appear once in an address.

3. A mixed environment of IPv4 and IPv6 nodes, x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of the six high-order 16-bit pieces of the address, and the 'd's are the decimal values of IPv4 address.

Address Prefix

It is similar to the way IPv4 address prefixes are written in Classless Inter-Domain Routing (CIDR) notation.

prefix-length is a decimal value specifying how many of the leftmost contiguous bits of the address comprise the prefix.

When writing both a node address and a prefix of that node address (e.g., the node's subnet prefix), the two can be combined.

Address Type Identification

The type of an IPv6 address is identified by the high-order bits of the address, as follows:

      Address type         Binary prefix        IPv6 notation   Section
      ------------         -------------        -------------   -------
      Unspecified          00...0  (128 bits)   ::/128          2.5.2
      Loopback             00...1  (128 bits)   ::1/128         2.5.3
      Multicast            11111111             FF00::/8        2.7
      Link-Local unicast   1111111010           FE80::/10       2.5.6
      Global Unicast       (everything else)

Anycast addresses are taken from the unicast address spaces (of any scope) and are not syntactically distinguishable from unicast addresses.

Unicast Addresses

   |          n bits               |           128-n bits            |
   |       subnet prefix           |           interface ID          |

Interface Identifiers

Interface identifiers in IPv6 unicast addresses are used to identify interfaces on a link. They are required to be unique within a subnet prefix. It is recommended that the same interface identifier not be assigned to different nodes on a link. They may also be unique over a broader scope. 

In some cases, an interface's identifier will be derived directly from that interface's link-layer address.

The same interface identifier may be used on multiple interfaces on a single node, as long as they are attached to different subnets. 

Note that the uniqueness of interface identifiers is independent of the uniqueness of IPv6 addresses. For example, a Global Unicast address may be created with a local scope interface identifier and a Link-Local address may be created with a universal scope interface identifier.