IPv6 (Internet Protocol Version 6) is an IP protocol version developed by the Internet Engineering Task Force (IETF). This protocol version is intended to replace the previously used IP protocol version 4 (IPv4) and represents a standardized method for transmitting data packets in computer networks. Central functions of IPv6 are the addressing of network elements via so-called IPv6 addresses and packet forwarding between subnets (routing). One of the main reasons for the development of IPv6 is the scarcity of public Internet addresses. IPv4 uses 32-bit addresses. This results in address space for approx. 4.3 billion addresses. IPv6, on the other hand, uses IPv6 addresses with a length of 128 bits. This address length allows an incredible number of 2^128 or 3,4 x 10^38 IPv6 addresses.

Structure of an IPv6 Address

IPv6 addresses consist of 8 blocks of 16 bits each with four-digit hexadecimal numbers. These blocks are each separated by a colon. Example:

2001:0620:0000:0000:0211:24FF:FE80:C12C

The first 64 bits are used for routing and designate the network prefix. The network prefix identifies the network, the subnet or the address range. The latter 64 bits are called Interface Identifiers (IID). The interface identifier identifies a host in this network and is made up from the 48-bit MAC address of the interface and converted to a 64-bit address. This is the modified EUI 64 format. This means that the interface can be uniquely identified independently of the network prefix. 

The network or subnet mask known from IPv4 is completely replaced with IPv6. To still be able to perform a segmentation, the prefix length is defined and attached to the actual IPv6 address with a "/" (slash). Example:

A subnetwork with the IPv6 addresses 2001:0820:9511:0000:0000:0000:0000:0000 through 2001:0820:9511:FFFF:FFFF:FFFF:FFFF:FFFF can be described with the notation 2001:0820:9511::/48.

Address Assignment

As a rule, Internet providers (ISPs) are assigned by the RIR /32 networks, which in turn subdivide them into subnets. End customers are assigned either /48 networks or /56 networks.

Privacy Extensions

An IPv6 address based on the modified EUI 64 format allows inferences to be drawn about the underlying MAC address. Since this could raise data protection concerns among users, privacy extensions have been developed to make the host portion of IPv6 addresses anonymous. For this purpose, privacy extensions release the coupling of the interface identifier and MAC address and generates temporary interface identifiers for outbound connections.

Notation Rules

Because IPv6 addresses can be very long, they are usually shortened. In this respect, binding notation rules have been defined in RFC 5952 . These include the following rules, among others:

  • Leading zeros within a block may be omitted.

  • A single block of 4 zeros is combined to one zero.

  • Consecutive blocks whose value is 0 or 0000 are shortened by two colons ("::"). This reduction may only be made once in an address, however, because otherwise the uniqueness is lost. Example:

    The address 2001:0dc8:0:0:8d5:0:0:0 may thus be shortened as follows: 2001:0dc8:0:0:8d5:0:: or 2001:0dc8:0::8d5:0:0:0 

  • If the address contains several zero sequences, only the sequence furthest to the left may be replaced.

URL Notation

IPv6 addresses are enclosed in square brackets in a URL. Example:

http://[2001:0db8:83a3:08d3::0380:7344]/ 

Port numbers must be behind the closing bracket. These are separated by a colon.

http://[2001:0db8:83a3:08d3::0380:7344]:8080/ 

The percent sign (%) is still used to identify hexadecimal character encoding in URLs. Within the URL, the percent sign must be replaced by its own hex code "%25" (RFC 6874). This is necessary if you want to force the connection through a specific interface.

IPv6 Address Types

As with IPv4, various address ranges with special tasks and properties are defined in IPv6 too. These were specified in RFC 4291 and RFC 5156 and can be identified by the first bits of an IPv6 address, known as the format prefix.

  • Loopback Addresses: The address 0:0:0:0:0:0:0:1 (also ::1/128) is called a loopback address. This is the address of your own location

  • Link-Local Addresses: Link-local addresses are only valid within local networks and start with the format prefix FE80::/10. These addresses are used for addressing elements within a local network, for auto-configuration or for neighbor discovery. Typically, a link-local address extends to the next router, so any device connected to the network is able to communicate with it to generate a global IPv6 address. This process is called neighbor discovery.

  • Unique-Local Addresses: Address ranges reserved for the IPv6 protocol have been defined for private local networks. These are described in RFC 4193 and have a similar function to the private address ranges defined in the IPv4 protocol. Unique local addresses are found in the address range "fc00::/7" (fc00... through fdff...) and are not routed on the Internet. Rather, they are only valid within a defined network area. You have to distinguish between the prefix "fc" and "fd", as these have different meanings. While IPv6 addresses with the prefix fc are assigned by the provider, IPv6 addresses with the prefix fd can be used in your local network.

  • Global Unicast Addresses: Global unicast addresses are globally unique addresses that are routed around the world. These are required by a network device to connect to the Internet. A host can have several of these IPv6 addresses. These are obtained from the host via autoconfiguration.

  • Multicast-Adressen: One-to-many communication can be realized using multicast addresses. Packets sent to a multicast address reach all network devices that are part of the multicast group. Here, a device can belong to multiple parallel multicast groups. When an IPv6 unicast address is created for a network device, it automatically becomes a member of certain multicast groups that are required for recognition, accessibility and prefix detection. Multicast addresses are identified by the prefix "ff::/8". This is followed by 4 bits for flags and another 4 bits for the multicast scope.

    Multicast addresses end with a number that represents a multicast group. A list of multicast groups can be found under https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml 

  • Anycast Addresses: Addresses of this type can be addressed to groups of receiver devices. The data packets are only sent to the device closest to the sender. Anycast addresses are therefore used for load distribution and fail-safe operation.

IPv6 Packet Format

The IPv6 protocol has a simplified packet format. The header has a fixed length of 40 bytes. In extension headers, optional information is swapped out between the IPv6 header data area and the actual payload. This allows options to be inserted without changing the header. Information that can include IPv6 header extensions includes node-to- node options, destination options, routing options, and options for fragmentation, authentication, and encryption. For more information on the IPv6 packet format, see RFC 2460

Stateless Address Auto-configuration

Stateless address auto-configuration (SLAAC) is a method for the stateless and automatic configuration of IPv6 addresses on a network interface. Using this procedure, a host can automatically establish a functioning Internet connection. In this context, stateless means that the respective IPv6 address is not assigned and stored centrally. Rather, the host creates a link-local IPv6 address for initial communication with the router and assigns this to itself. With this link-local IPv6 address, a device can search for routers in its network segment using the neighbor discovery protocol (NDP). This is done by a request to the multicast address, via which all routers of a segment can be reached.

After receiving such a request, a router sends information on available prefixes. To avoid the double allocation of IPv6 addresses, the host performs a duplicate address detection (DAD) with a newly generated IPv6 address. To do this, the host sends a request to the generated address on the local network. A multicast address is used as the reply to address. If another station is already using the IPv6 address, there will be a reply. If no reply comes back from this address, the host uses the IPv6 address for communication.

Neighbour Discovery Protocol

Neighbor discovery protocol (NDP) is an IPv6 protocol. It is used to convert IPv6 addresses to link-layer addresses (MAC addresses), among other things. In addition, it is used to update the cached addresses. If a node is not on the same network, NDP is used to find a router that can forward the packets. The tasks of this protocol also include the following:

  • Parameter determination

  • Stateless address auto-configuration

  • Address resolution (address resolution with neighbor discovery)

  • Neighbor unreachability detection (NUD)

  • Duplicate address detection (DAD)

  • Redirect

You can find more information about the neighbor discovery protocol in RFC 4861.

DHCP6

DHCP is a protocol used to manage IP configuration in a TCP/IP network. This allows you to integrate connected clients into an existing network without manual configuration of the network interface. In an IPv6 network, DHCP6 is not actually required, since this task is performed by the stateless address auto-configuration (SLAAC). However, there are good reasons to use DHCP6. This is the case, for example, if the IPv6 client cannot accept the options of the IP configuration using stateless address auto-configuration. In this case, the IP address can be allocated using stateless address auto-configuration and the remaining configuration parameters using DHCPv6.


Did this article help you?

Your feedback helps us to further improve our services. To leave feedback, log in to your IONOS account by clicking on the login button at the top right. You can then submit a rating below the article.