IPv6 Address Allocation
Configuring an IPv6 address on a device involves specifying the network prefix and generating the interface identifier, which can be assigned manually or automatically. Unlike IPv4, which has a single primary address per interface, IPv6 allows multiple addresses on a single interface, allowing for various functionalities such as link-local, global, and temporary addresses. This adaptability allows for more efficient network operations and supports features like Stateless Address Autoconfiguration (SLAAC) and privacy extensions. IPv6 address allocation offers diverse deployment scenarios and preference options:
- Static Assignment Using a Manual Interface ID: Manually assign an IPv6 address by combining a network prefix (/64) with a selected interface ID. Although suitable for static configurations, it necessitates manual effort.
- Static Assignment Using EUI-64 Interface ID: Using the EUI-64 feature, the interface ID is derived from the device's MAC address, ensuring consistency. It extends the MAC's 48 bits to the required 64 bits, enhancing uniqueness. This format aids auto-configuration, allowing devices to generate consistent IPv6 addresses even as they change networks. This is useful for devices with fixed MAC addresses.
- Stateless Address Autoconfiguration (SLAAC): Devices generate IPv6 addresses based on the network prefix they receive from the router advertisements and their interface ID. SLAAC simplifies configuration but lacks centralized control. The EUI-64 format is particularly useful for SLAAC in IPv6 networks.
- Stateful DHCPv6: DHCPv6 assigns addresses and other configuration information like DHCPv4 does in IPv4. It provides centralized control and is suitable for policy enforcement but requires you to have DHCPv6 servers in the network.
- Stateless DHCPv6: This method is essential for achieving a balanced approach when using SLAAC or experiencing limited stateful DHCP functionality. While devices receive only the basic network parameters using SLAAC (or incorrectly configured stateful DHCP server), DHCPv6 provides supplementary settings, such as DNS servers, domain names, and other client-relevant information, so that devices are fully operational.
The following configuration provides an example of configuring a public IPv6 address with static assignment using a manual interface ID, where you need to define all 128 bits of the IPv6 address:
The following configuration provides an example of configuring a public IPv6 address with static assignment using EUI-64 interface ID, where you need to define only the prefix, while the host ID is automatically configured by the EUI-64 feature:
The following configuration provides an example of configuring an IPv6 address using the stateless autoconfiguration feature, also known as SLAAC, where you can use the additional “default” option to use the default route that might be advertised in the router advertisements.
NOTE: A Cisco router does not have IPv6 routing enabled by default, therefore, use the ipv6 unicast-routing command in global configuration mode to enable IPv6 routing.