Sub topic 3
Interface Identifiers, Autoconfiguration, and IPv6 Operations
Assume you know IPv4 CIDR notation, hexadecimal, and the role of a default gateway. This chapter focuses on how IPv6 hosts create addresses and learn network settings.
Interface identifiers and privacy
An IPv6 address usually contains a routing prefix and a 64-bit interface identifier. For example, in 2001:db8:10:1:abcd:1234:5678:9abc/64, the first 64 bits identify the subnet. The last 64 bits identify an interface on that subnet.
An older method called modified EUI-64 derived the identifier from a network card's MAC address. This made the host easier to recognize over time. Modern systems usually prefer stable opaque identifiers or temporary privacy addresses. A stable identifier remains consistent for network management. A temporary identifier changes periodically for outbound connections.
import ipaddress
address = ipaddress.ip_address("2001:db8:10:1:abcd:1234:5678:9abc")
print(address.exploded)
print(address.compressed)Neighbor Discovery and Router Advertisements
Neighbor Discovery Protocol (NDP) uses ICMPv6 messages to discover neighboring devices, resolve link-layer addresses, and find routers. A router sends a Router Advertisement (RA) that describes the local prefix and configuration flags.
An RA can tell a host to create an address with SLAAC, use DHCPv6, or use both.
Autoconfiguration with SLAAC
Stateless Address Autoconfiguration (SLAAC) lets a host combine an advertised prefix with a locally generated interface identifier. The host also creates a link-local address from fe80::/10. Link-local addresses support communication on the local link and are essential for NDP.
The host checks for duplicate addresses before using them. SLAAC supplies an address and prefix information, but the RA supplies the default route.
DHCPv6 and when to use it
DHCPv6 can assign addresses and additional settings such as DNS servers. In stateful DHCPv6, the server tracks address leases. In stateless DHCPv6, SLAAC supplies the address while DHCPv6 supplies other configuration.
Use DHCPv6 when centralized address records or detailed host configuration matter. Do not assume DHCPv6 supplies the default gateway. Hosts normally learn that route from RAs.
Living alongside IPv4
Dual stack runs IPv4 and IPv6 together. It is the usual transition method when both protocols are available. Tunnels carry IPv6 through an IPv4 network. Translation allows IPv6-only and IPv4-only systems to communicate, but can remove end-to-end features.
Inspecting addresses in practice
On Linux, inspect addresses and routes with:
ip -6 addr show
ip -6 route show
ping -6 -c 3 ::1Look for the address scope, prefix length, and interface. A fe80:: address is link-local and normally requires an interface name when used in a command.
Exercise
A host receives an RA for 2001:db8:20:5::/64 but no DHCPv6 lease. Can it still receive an IPv6 address and default route?
Show answer
Yes. SLAAC can create an address from the advertised /64, and the RA can install the default route. DHCPv6 is not required unless the network requires its additional settings or stateful allocation.