In this chapter, we'll look at one of the most practical aspects of IPv6 deployment: assigning IP addresses to hosts on a local network. The IPv6 architecture has been designed for flexibility, allowing each device to generate its own address automatically, while still allowing fully manual configuration when needed.
An IPv6 local network systematically divides the address into two parts:
- the first 64 bits represent the subnet prefix, usually provided by a router or an address authority;
- the remaining 64 bits are used by the host to uniquely identify itself on that segment. This model greatly simplifies route aggregation and address block management.
Two main approaches are used to assign addresses to devices:
- Manual configuration, where the administrator specifies each interface's exact address;
- Automatic configuration,where devices generate or obtain their own addresses dynamically.
In manual configuration, the administrator assigns the complete IPv6 address to each interface. Certain values remain reserved:
::/128: unspecified address, never permanently assigned ;::1/128: loopback address (loopback), IPv4 equivalent:127.0.0.1.
Unlike IPv4, there is no broadcast concept; "all zeros" or "all ones" combinations in the host portion have no special meaning.
Manual configuration is still useful in controlled environments but becomes difficult to maintain at scale.
For automatic configuration, several methods exist:
- The NDP (Neighbor Discovery Protocol) protocol, specified by RFC4862, enables stateless auto-configuration. In this mode, the host receives a network prefix from a local router, and completes the address itself with an identifier based on its MAC address. This method is simple to deploy, and requires no central server.
- Implementations like those in Windows can generate the host portion pseudo-randomly to improve privacy by avoiding direct exposure of the MAC address. Revealing the MAC address in IPv6 packets can raise privacy concerns, as it allows tracking of a device across different networks.
- DHCPv6 protocol: Defined in RFC3315 and similar to the DHCP used for IPv4, it enables more controlled and centralized configuration, including lease management, extra options (DNS, MTU...), and databases registration. DHCPv6 can operate alone or alongside stateless configuration to provide additional parameters without assigning the IP address itself.
Important note: In the MAC-based method, the MAC address is converted to a 64-bit identifier using the EUI-64 format. This mechanism inserts the bytes
FF:FE in the middle of the original MAC address (in 48 bits), and inverts the 7th bit to indicate global uniqueness. The result is a stable Interface identifier, used in the full IPv6 address.Here's an example of how to transform a MAC address into EUI-64:
However, due to growing concerns over device tracking, modern operating systems (notably Linux, Windows 10+, macOS, Android) now enable privacy extensions by default. These use randomly generated interface identifiers that are periodically renewed for outgoing connections, while keeping a stable identifier for internal communications (such as DNS or DHCPv6).
As with DHCP in IPv4, automatically assigned IPv6 addresses can have two lifetimes, defined by DHCPv6 routers or servers:
- Preferred lifetime: after this period, the address remains valid, but is no longer used to initiate new connections;
- Valid lifetime: when this time expires, the address is completely removed from the Interface configuration.
This system makes it possible to manage network changes dynamically, for example, ensuring a smooth transition from one ISP to another. By updating the prefix announced by routers and adjusting DNS records in parallel, IPv6 migration can be carried out without any noticeable service interruption.
Tip: The combined use of address and DNS lifecycles makes it possible to implement a gradual transition strategy, where new connections move to a new topology, while existing connections continue until their natural end.
In short, IPv6 offers a wide range of flexibility for address assignment: manual configuration, stateless or stateful auto-configuration, DHCPv6, or random generation. EEach approach comes with its own advantages and limitations, and can be adapted according to the required level of control, the size of the network, or privacy needs.
Quiz
Quiz1/5
net3024.2
What is the typical size of the network prefix used in an IPv6 address on a local network?