This white paper discusses IPv6 addressing and compares it with IPv4. It outlines the three types of IPv6 address – unicast, multicast, and anycast. It also discusses types of unicast addresses and IEEE 802 addressing.
Comparing IPv4 and IPv6 addresses
IPv4 contains a 32-bit address space, which provides for 2^32 – or 4,294,967,296 – addresses. The IPv6 128-bit address spaces allows for 2^128 – or 340,282,366,920,938,463,374,607,431,768,211,456 or 3.4 × 10^38 – possible addresses.
The current allocation of IPv6 addresses is determined according to the value of their high order bits. These values are fixed and also known as a Format Prefix (FP).
|Status of allocation space||FP in binary||Fraction of the address space|
|Reserved for Network Service Access Point (NSAP) allocation||0000 001||1/128|
|Reserved for Internet Packet Exchange (IPX) allocation||0000 010||1/128|
|Aggregatable global unicast addresses||001||1/8|
|Unassigned||1111 1110 0||1/512|
|Link-local unicast addresses||1111 1110 10||1/1024|
|Site-local unicast addresses||1111 1110 11||1/1024|
|Multicast addresses||1111 1111||1/256|
IPv4 addresses use dotted decimal notation, whereby the address is divided into octets. Each octet in an IPv4 address is assigned a decimal value from 0 to 255. IPv6 addresses are represented using the format
Each X represents a 16-bit section of the 128-bit address and is converted to four hexadecimal digits separated by colons. For example,
This address represented in binary is:
1110110010111101000000001101001100000000000000001011001100 1111011000011110000101000000000000000000010111001101001111 010100011100
The IPv6 address is divided into 16-bit boundaries
110110010111101 0000000011010011 000000000000000 011001100111101 1000011110000101 000000000000000 001011100110100 111010100011100
The first four digits conform to the unassigned prefix value 1110, which represents 1/16 of all IPv6 addresses.
In instances where a zero is the first digit in the 4-digit hexadecimal number, the zero can be omitted. When an IPv6 address consists of a series of zeros, a double colon (::) can be used in place of the zeros. For example, you would use 3450::3 to display the address
The IPv6 prefix specifies the bits within the address that are assigned fixed values. The prefix can also be the network identifier. IPv6 prefixes for address ranges, routes, and subnet identifiers are expressed in address/prefix-length notation. This uses the structure of classless interdomain routing (CIDR) notation employed by IPv4. For example, a subnet prefix would be expressed as
Types of IPv6 address
IPv4 uses broadcast addressing, whereby every network node must process all broadcast requests. This is an inefficient routing process, as most broadcasts are not relevant to the majority of nodes on the network.
The three types of addressing employed by IPv6 are
Unicast addresses are 128-bit fields that identify a single IPv6 interface. They contain information that refers exclusively to the associated interface, and packets sent to a unicast address will be forwarded to the relevant interface.
Like IPv4 addresses, unicast addresses can be split into two parts:
- the subnet prefix
- the interface ID
The subnet prefix is used to route the packet. The distance of the router from the specified interface address influences the length of the subnet prefix, which in turn can determine the length of the interface ID. The interface ID identifies the network node associated with the target IPv6 interface.
IPv6 multicast addresses identify a set of interfaces that are usually assigned to different nodes. Packets transmitted to a multicast address are sent to all interfaces linked to that address. Multicast addresses cannot be the source address for a packet – they can only be the destination address.
IPv6 multicast addresses consist of four fields. The Format Prefix field is an 8-bit field that identifies the packet's destination as a multicast address. The Flgs field contains 4-bit flags. The fourth or lowest order bit of the Flgs field specifies whether the multicast address is transient or well known – the first three bits have not yet been assigned a function.
The Scope field specifies the scope of the multicast address group. The scope can range from including nodes on only the local network to nodes at any IPv6 global address. The multicast group is represented by the value in the 112-bit Group ID field.
|Defined Value||Type of scope|
Anycast addressing identifies a set of interfaces that are usually assigned to different nodes. Multiple nodes can share anycast addresses, but only one node can receive the packets from the anycast address. Packets transmitted to an anycast address are sent to the nearest interface associated with that address. Anycast addresses are assigned to routers, rather than hosts, and they cannot be used as source addresses.
- Internet service provider (ISP)
- routing domain
Types of unicast addresses
The types of IPv6 unicast addresses include
- aggregatable global unicast addresses
- link-local addresses
- site-local addresses
- special IPv6 addresses
Aggregatable global unicast addresses are intended to provide efficient routing and are similar to the public IPv4 address. They share the structure of site-local address after the first 48 bits.
The aggregatable global unicast address structure contains the following five fields:
- the 13-bit Top-Level Aggregation Identifier field
- the 8-bit Reserved field
- the 24-bit Next-Level Aggregation Identifier field
- the 16-bit Site-Level Aggregation Identifier field
- the 64-bit Interface ID field
Both site-local and link-local addresses are types of local-use unicast address. Nodes use link-local addresses to communicate with neighbor nodes on the same network link. They are also used for Neighbor Discovery protocol transmissions. Site-local addresses are used to transmit messages to nodes within the same site. Such addresses are not accessible to nodes on external sites.
Special IPv6 addresses
The two types of special IPv6 addresses are
- unspecified address
- loopback address
The unspecified address does not identify an interface or target address. It can be used as a source to confirm the identity of an undefined address and to mark the absence of an IPv6 address. Loopback addresses identify a loopback interface, whereby a node can use a loopback address to send a message to itself.
The compatibility addresses are designed to assist with the transition from IPv4 to IPv6. This form of address can support both host types and contains the following addresses:
- IPv4-compatibile address
- IPv4-mapped address
- 6to4 address
IPv6/IPv4 nodes that use IPv6 for communication use IPv4-compatible addresses. IPv4-compatibile addresses can be the destination address for IPv6 messages. For IPv6 messages to be forwarded to this destination, they are encapsulated within IPv4 headers.
The IPv4-mapped addresses represent an IPv4 node that can only be used on the IPv4 infrastructure to an IPv6 node. This type of address cannot be the source or destination address of an IPv6 packet.
The 6to4 address is a tunneling technique that enables two nodes that support both IPv4 and IPv6 to communicate.
IEEE 802 addresses
Institute of Electrical and Electronics Engineers (IEEE) 802 addresses are 48-bit addresses that identify network adapters. They consist of two parts:
- the 24-bit company ID
- the 24-bit extension ID, or board ID
The company ID identifies the manufacturer of the network adapter, and the extension ID is the unique global identifier of the network adapter.
IEEE 802 has two defined bits:
- Universal/Local (UL)
- Individual/Group (I/G)
The UL bit in the first byte specifies whether the IEEE 802 address is administered locally or universally, and the I/G bit in the first byte indicates whether the address is unicast (local) or multicast (group).
The IEEE 802 address is also known as the
- hardware address
- media access control (MAC) address
- physical address
IEEE EUI-64 addresses
The IEEE EUI-64 address provides a larger addressing space than the IEEE 802 address by increasing the extension ID to 40 bits. IEEE 802 addresses can be mapped to EUI-64 addresses by adding the 16-bits 0×FFFE – or 1111 1111 1111 1110 – between the company ID and the extension ID.
EUI-64 addresses can be mapped to an interface identifier for IPv6 unicast addresses by replacing the 1 with 0 or 0 with 1 in the U/L bit in the EUI-64 address. To map an IEEE 802 address to an IPv6 interface identifier, the IEEE 802 address must first be converted to EUI-64.
IPv6 addresses are 128-bits long, and they are assigned to interfaces and sets of interfaces. Unicast addresses identify single interfaces, and they are divided into the subnet prefix and the interface ID. The subnet prefix is used to specify routing, and the interface ID identifies the target interface. Multicast addresses identify a set of interfaces that are usually assigned to different nodes. Anycast addresses also identify a set of interfaces assigned to different nodes, but a packet with an anycast address is routed to the nearest interface having that address. Types of unicast address include aggregatable global unicast addresses, special addresses, and compatibility addresses.