IPv6 Autoconfiguration: SLAAC vs DHCPv6
Published • 25 min read
TL;DR: IPv4 address classes were the original system for organizing internet addresses into Class A (large networks), Class B (medium networks), and Class C (small networks). This rigid system wasted addresses and was replaced by CIDR (Classless Inter-Domain Routing), but understanding classes helps explain legacy configurations and network behavior you'll still encounter today.
What is IPv6 autoconfiguration and why does it matter?
IPv6 autoconfiguration is one of the protocol's most powerful features—the ability for devices to automatically obtain IP addresses and network configuration without manual intervention or centralized servers. Unlike IPv4, where you typically need DHCP servers or manual configuration, IPv6 was designed from the ground up to enable plug-and-play networking.
Think of IPv6 autoconfiguration like a smart building where new tenants can automatically receive their apartment number, building address, and local services information just by plugging into the network. The building (router) broadcasts essential information, and each tenant (host) uses this information along with their own unique identifier to create a complete address.
This capability is crucial for network engineers because it enables scalable deployment of IPv6 networks, reduces administrative overhead, and supports the Internet of Things (IoT) vision where billions of devices need network connectivity without manual configuration. Understanding autoconfiguration mechanisms helps you design networks that are both automated and manageable.
IPv6 address types and scope
Before diving into autoconfiguration methods, it's essential to understand the different types of IPv6 addresses and their intended use cases.
Link-local addresses: The foundation
Every IPv6 interface automatically generates a link-local address, which provides basic connectivity within the local network segment. These addresses are the foundation of all IPv6 communication and autoconfiguration.
Link-local characteristics:
- Address prefix: fe80::/10 (fe80:0000:0000:0000 to febf:ffff:ffff:ffff)
- Scope: Valid only on the local network segment
- Automatic generation: Created without any configuration
- Interface identifier: Derived from MAC address or random generation
- Duplicate detection: Uses Duplicate Address Detection (DAD) to ensure uniqueness
Link-local address formation:
# Link-local address construction
Prefix: fe80::/64
MAC: 00:1b:63:84:45:e6
# Modified EUI-64 process:
1. Insert fffe: 00:1b:63:ff:fe:84:45:e6
2. Flip universal bit: 02:1b:63:ff:fe:84:45:e6
3. Result: fe80::21b:63ff:fe84:45e6/64
Modern privacy considerations:
Many modern systems use random interface identifiers instead of MAC-based addresses to prevent device tracking and improve privacy.
Global unicast addresses: Internet connectivity
Global unicast addresses provide internet-wide connectivity and are the IPv6 equivalent of public IPv4 addresses.
Global unicast characteristics:
- Address scope: Globally routable across the internet
- Prefix delegation: ISPs allocate prefixes to organizations
- Hierarchical structure: Network prefix + interface identifier
- Multiple addresses: Interfaces can have multiple global addresses
Unique local addresses (ULA): Private networking
ULA addresses (fc00::/7) provide private addressing similar to RFC 1918 addresses in IPv4, but with global uniqueness to prevent conflicts during network mergers.
SLAAC: Stateless Address Autoconfiguration
SLAAC (Stateless Address Autoconfiguration) allows hosts to configure their own IPv6 addresses using information provided by local routers through Router Advertisement (RA) messages. It's called "stateless" because routers don't maintain records of which addresses are assigned to which hosts.
How SLAAC works: The complete process
SLAAC configuration steps:
- Link-local generation: Host creates link-local address automatically
- Duplicate Address Detection: Host verifies address uniqueness via Neighbor Solicitation
- Router Discovery: Host sends Router Solicitation or waits for Router Advertisement
- Prefix learning: Router provides network prefix in Router Advertisement
- Global address generation: Host combines prefix with interface identifier
- Address validation: Host performs DAD on new global address
- Default route installation: Host configures router as default gateway
Router Advertisement messages
Router Advertisement (RA) messages are the heart of SLAAC, providing all the information hosts need to configure themselves automatically.
RA message contents:
- Router Lifetime: How long to use this router as default gateway
- Prefix Information: Network prefixes and their properties
- Flags: Configuration instructions (Managed, Other, etc.)
- Route Information: Additional routes beyond default
- DNS Information: Recursive DNS servers (RDNSS) and search lists
- MTU: Maximum transmission unit for the link
RA configuration example (Cisco):
# IPv6 interface configuration with SLAAC
interface GigabitEthernet0/1
ipv6 enable
ipv6 address 2001:db8:100::1/64
ipv6 nd prefix 2001:db8:100::/64 no-autoconfig
ipv6 nd prefix 2001:db8:200::/64
ipv6 nd ra interval 200
ipv6 nd ra lifetime 1800
no shutdown
RA configuration example (Linux with radvd):
# /etc/radvd.conf
interface eth0 {
AdvSendAdvert on;
AdvManagedFlag off;
AdvOtherConfigFlag on;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvReachableTime 0;
prefix 2001:db8:100::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvPreferredLifetime 3600;
AdvValidLifetime 7200;
};
RDNSS 2001:db8:100::53 {
AdvRDNSSLifetime 3600;
};
};
SLAAC address generation methods
Modified EUI-64:
The original method derives interface identifiers from MAC addresses, providing consistent addresses but raising privacy concerns.
# EUI-64 conversion process
MAC Address: aa:bb:cc:dd:ee:ff
Step 1: Insert fffe - aa:bb:cc:ff:fe:dd:ee:ff
Step 2: Flip universal bit - a8:bb:cc:ff:fe:dd:ee:ff
IPv6 Suffix: a8bb:ccff:fedd:eeff
Full Address: 2001:db8:100:a8bb:ccff:fedd:eeff
Privacy Extensions (RFC 4941):
Modern systems often use temporary random interface identifiers to prevent tracking and improve privacy.
# Privacy extension behavior
Primary Address: 2001:db8:100:a8bb:ccff:fedd:eeff (stable, EUI-64)
Temporary Address: 2001:db8:100:1234:5678:9abc:def0 (random, changes periodically)
# Windows example showing multiple addresses
C:\> ipconfig
Ethernet adapter Local Area Connection:
IPv6 Address: 2001:db8:100:a8bb:ccff:fedd:eeff (Preferred)
Temporary IPv6 Address: 2001:db8:100:1234:5678:9abc:def0 (Preferred)
Stable Privacy Addresses (RFC 7217):
A newer approach that generates stable but unpredictable addresses using cryptographic hashing of network parameters and a secret key.
DHCPv6: Stateful address assignment
DHCPv6 provides centralized address assignment and configuration management similar to DHCP in IPv4, but with additional flexibility designed for IPv6's unique characteristics.
DHCPv6 operation modes
Stateful DHCPv6:
The server assigns and tracks IPv6 addresses, maintaining state information about each client.
- Address assignment: Server provides IPv6 addresses from configured pools
- State tracking: Server maintains lease database
- Renewal process: Clients renew leases before expiration
- Centralized control: Administrators manage address allocation policies
Stateless DHCPv6:
Hosts use SLAAC for addresses but DHCPv6 for additional configuration parameters like DNS servers.
- No address assignment: Hosts configure addresses via SLAAC
- Configuration only: Server provides DNS, NTP, domain names
- Minimal state: Server doesn't track individual client addresses
- Hybrid approach: Combines benefits of both methods
DHCPv6 message exchange process
Four-message exchange (Stateful):
- Solicit: Client broadcasts request for configuration
- Advertise: Servers respond with available configuration
- Request: Client requests specific configuration from chosen server
- Reply: Server confirms assignment and provides configuration
Two-message exchange (Stateless):
- Information-Request: Client requests configuration parameters only
- Reply: Server provides requested parameters
DHCPv6 server configuration example (ISC DHCP):
# /etc/dhcp/dhcpd6.conf
default-lease-time 3600;
max-lease-time 7200;
# Stateful configuration
subnet6 2001:db8:100::/64 {
range6 2001:db8:100::1000 2001:db8:100::1fff;
option dhcp6.name-servers 2001:db8:100::53, 2001:db8:100::54;
option dhcp6.domain-search "example.com", "local.example.com";
option dhcp6.sntp-servers 2001:db8:100::123;
}
# Host reservation
host client1 {
host-identifier option dhcp6.client-id
00:01:00:01:12:34:56:78:aa:bb:cc:dd:ee:ff;
fixed-address6 2001:db8:100::100;
}
DHCPv6 Prefix Delegation
DHCPv6 Prefix Delegation (PD) allows ISPs to dynamically assign IPv6 prefixes to customer sites, enabling automatic subnet configuration for home and small office networks.
PD configuration example:
# ISP DHCPv6 server with prefix delegation
subnet6 2001:db8::/32 {
# Client gets addresses from this range
range6 2001:db8:100::1 2001:db8:100::ffff;
# Delegate /56 prefixes to clients for subnetting
prefix6 2001:db8:1000:: 2001:db8:1fff:: /56;
option dhcp6.name-servers 2001:db8::53;
}
# Customer router receiving delegated prefix
# Will get something like 2001:db8:1234::/56
# Can create subnets: 2001:db8:1234:0::/64, 2001:db8:1234:1::/64, etc.
Router Advertisement flags: Controlling autoconfiguration
Router Advertisement flags tell hosts how to configure themselves, controlling the interaction between SLAAC and DHCPv6.
Key RA flags and their meanings
Managed (M) Flag:
- Set (1): Use DHCPv6 for address configuration
- Clear (0): Use SLAAC for address configuration
Other (O) Flag:
- Set (1): Use DHCPv6 for other configuration (DNS, NTP, etc.)
- Clear (0): Get all configuration from RA messages
Configuration scenarios:
M Flag | O Flag | Behavior | Use Case |
0 | 0 | SLAAC only | Simple networks, home use |
0 | 1 | SLAAC + Stateless DHCPv6 | Common enterprise deployment |
1 | 0 | Stateful DHCPv6 only | Maximum control, unusual |
1 | 1 | Stateful DHCPv6 | Full DHCP control |
Practical flag configuration examples
SLAAC with stateless DHCPv6 (M=0, O=1):
# Cisco configuration
interface GigabitEthernet0/1
ipv6 address 2001:db8:100::1/64
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ipv6 dhcp server DHCPv6-POOL
ipv6 dhcp pool DHCPv6-POOL
dns-server 2001:db8:100::53
domain-name example.com
Stateful DHCPv6 (M=1, O=1):
# Full DHCPv6 control
interface GigabitEthernet0/1
ipv6 address 2001:db8:100::1/64
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ipv6 nd prefix default no-autoconfig
ipv6 dhcp server DHCPv6-STATEFUL
ipv6 dhcp pool DHCPv6-STATEFUL
address prefix 2001:db8:100::/64
dns-server 2001:db8:100::53
domain-name example.com
Duplicate Address Detection (DAD)
Duplicate Address Detection ensures address uniqueness on the local network segment before hosts begin using their IPv6 addresses.
DAD process and timing
DAD operation:
- Tentative state: Address enters tentative state (not yet usable)
- Neighbor Solicitation: Host sends NS message for proposed address
- Wait period: Host waits for responses (typically 1 second)
- Conflict detection: If another host responds, address is duplicate
- Address assignment: If no response, address becomes valid
DAD packet capture example:
# Wireshark capture of DAD process
1. ICMPv6 Neighbor Solicitation
Source: :: (unspecified address)
Target: 2001:db8:100:a8bb:ccff:fedd:eeff
Options: Source Link-layer Address
2. No ICMPv6 Neighbor Advertisement received
3. Address 2001:db8:100:a8bb:ccff:fedd:eeff becomes valid
DAD configuration and optimization:
# Adjust DAD parameters on Linux
echo 1 > /proc/sys/net/ipv6/conf/all/dad_transmits
echo 100 > /proc/sys/net/ipv6/conf/all/dad_transmit_time_ms
# Disable DAD (not recommended for production)
echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_dad
IPv6 address lifecycle and management
IPv6 addresses have complex lifecycle states that affect their usage and reachability.
Address states and transitions
Address lifecycle states:
- Tentative: Undergoing DAD, not yet usable
- Preferred: Valid and preferred for new connections
- Deprecated: Valid but discouraged for new connections
- Invalid: No longer usable, should be removed
Viewing address states:
# Linux: Show address states
ip -6 addr show dev eth0
2: eth0: mtu 1500 qlen 1000
inet6 2001:db8:100:a8bb:ccff:fedd:eeff/64 scope global dynamic
valid_lft 7168sec preferred_lft 3568sec
inet6 fe80::a8bb:ccff:fedd:eeff/64 scope link
valid_lft forever preferred_lft forever
# Windows: Show address information
netsh interface ipv6 show addresses
Interface 12: Local Area Connection
Addr Type DAD State Valid Life Pref. Life Address
--------- ---------- ---------- --------- ------------------------
Public Preferred 7168 3568 2001:db8:100:a8bb:ccff:fedd:eeff
Link Preferred infinite infinite fe80::a8bb:ccff:fedd:eeff
Address renumbering and deprecation
IPv6 supports graceful renumbering through address deprecation, allowing networks to change prefixes without service interruption.
Renumbering process:
- Announce new prefix: Router advertises new prefix alongside old
- Hosts configure new addresses: Clients obtain addresses from both prefixes
- Deprecate old prefix: Router marks old prefix as deprecated
- Applications prefer new addresses: New connections use new prefix
- Remove old prefix: After existing connections close, remove old prefix
Renumbering configuration example:
# Phase 1: Add new prefix
interface GigabitEthernet0/1
ipv6 nd prefix 2001:db8:100::/64 14400 7200 # Old prefix
ipv6 nd prefix 2001:db8:200::/64 # New prefix
# Phase 2: Deprecate old prefix
interface GigabitEthernet0/1
ipv6 nd prefix 2001:db8:100::/64 14400 0 # Deprecated
ipv6 nd prefix 2001:db8:200::/64 # Preferred
# Phase 3: Remove old prefix
interface GigabitEthernet0/1
no ipv6 nd prefix 2001:db8:100::/64 # Removed
ipv6 nd prefix 2001:db8:200::/64 # Only prefix
Comparing SLAAC vs DHCPv6: When to use each
Understanding the trade-offs between SLAAC and DHCPv6 helps you choose the right approach for different network scenarios.
SLAAC advantages and limitations
SLAAC advantages:
- Simplicity: No server infrastructure required
- Scalability: Routers don't maintain per-host state
- Resilience: Works even if DHCP servers fail
- Speed: Faster configuration than DHCP exchange
- Plug-and-play: Devices work immediately after connection
SLAAC limitations:
- Limited control: Cannot assign specific addresses to specific hosts
- No audit trail: Difficult to track which host uses which address
- DNS challenges: Dynamic DNS updates require additional mechanisms
- Security concerns: Cannot prevent unauthorized hosts from obtaining addresses
DHCPv6 advantages and limitations
DHCPv6 advantages:
- Centralized control: Administrator manages all address assignments
- Address tracking: Server maintains lease database
- Host identification: Can assign specific addresses to specific hosts
- Rich configuration: Can provide extensive configuration parameters
- Integration: Works well with existing DHCP infrastructure
DHCPv6 limitations:
- Infrastructure complexity: Requires server deployment and management
- Single point of failure: Network depends on DHCP server availability
- Client support: Not all devices support DHCPv6 fully
- Relay requirements: May need DHCP relays for multiple subnets
Deployment scenarios and recommendations
SLAAC-only deployment:
- Home networks: Simple setup, minimal administration
- IoT devices: Sensors and embedded devices with minimal configuration needs
- Temporary networks: Conference networks, temporary installations
- Development environments: Quick setup for testing and development
SLAAC + Stateless DHCPv6:
- Enterprise networks: Balance of simplicity and control
- Branch offices: Centralized DNS and configuration management
- Campus networks: Scalable with consistent configuration
- Service provider networks: Customer networks with managed services
Stateful DHCPv6:
- High-security environments: Full address tracking and control
- Compliance requirements: Audit trails and address accountability
- Legacy integration: Environments requiring IPv4-like DHCP behavior
- Server environments: Static address assignments for servers
Troubleshooting IPv6 autoconfiguration
IPv6 autoconfiguration problems can be subtle and require systematic diagnosis to identify root causes.
Common autoconfiguration problems
No global address assignment:
- Symptoms: Hosts only have link-local addresses
- Causes: No Router Advertisements, incorrect RA flags, firewall blocking
- Diagnosis: Capture Router Advertisement messages, check RA timing
Duplicate address conflicts:
- Symptoms: Address assignment failures, connectivity issues
- Causes: MAC address collisions, disabled DAD, network loops
- Diagnosis: Monitor DAD process, check for duplicate MAC addresses
DHCPv6 server not responding:
- Symptoms: Missing configuration parameters, DHCP timeouts
- Causes: Server misconfiguration, relay problems, firewall blocking UDP 547
- Diagnosis: Test DHCPv6 server directly, check relay configuration
Diagnostic tools and techniques
Router Advertisement monitoring:
# Capture Router Advertisements
tcpdump -i eth0 'icmp6 and ip6[40] == 134'
# Send Router Solicitation to trigger RA
rdisc6 eth0
# Monitor RA with detailed information
radvdump
Address configuration debugging:
# Linux: Monitor address configuration events
ip monitor address
# View neighbor discovery cache
ip -6 neighbor show
# Check IPv6 routing table
ip -6 route show
# Windows: IPv6 configuration details
netsh interface ipv6 show global
netsh interface ipv6 show addresses
netsh interface ipv6 show neighbors
DHCPv6 troubleshooting:
# Test DHCPv6 server manually
dhclient -6 -v eth0
# Monitor DHCPv6 traffic
tcpdump -i eth0 'port 546 or port 547'
# DHCPv6 server logs (ISC DHCP)
tail -f /var/log/dhcpd.log
# Release and renew DHCPv6 lease
dhclient -6 -r eth0
dhclient -6 eth0
Security considerations for IPv6 autoconfiguration
IPv6 autoconfiguration introduces new security challenges that require specific mitigation strategies.
SLAAC security risks
Rogue Router Advertisements:
Malicious hosts can send fake Router Advertisements to redirect traffic or cause denial of service.
Mitigation strategies:
# Cisco RA Guard configuration
interface GigabitEthernet0/1
description Access port - client facing
ipv6 nd raguard attach-policy CLIENT-PORTS
ipv6 nd raguard policy CLIENT-PORTS
device-role host
match ra prefix-list ALLOWED-PREFIXES
match ra hop-limit minimum 64
trusted-port
Address scanning and enumeration:
SLAAC addresses based on MAC addresses can be predictable, enabling network reconnaissance.
Privacy protection:
# Enable IPv6 privacy extensions on Linux
echo 2 > /proc/sys/net/ipv6/conf/all/use_tempaddr
echo 2 > /proc/sys/net/ipv6/conf/default/use_tempaddr
# Configure temporary address lifetimes
echo 3600 > /proc/sys/net/ipv6/conf/all/temp_prefered_lft
echo 7200 > /proc/sys/net/ipv6/conf/all/temp_valid_lft
DHCPv6 security considerations
DHCPv6 snooping and guard:
# Cisco DHCPv6 guard configuration
ipv6 dhcp guard policy DHCP-GUARD
device-role client
match server access-list DHCP-SERVERS
interface range GigabitEthernet0/1-24
ipv6 dhcp guard attach-policy DHCP-GUARD
ipv6 access-list DHCP-SERVERS
permit host 2001:db8:100::53
IPv6 autoconfiguration in enterprise environments
Large-scale IPv6 deployments require careful planning to balance automation with control and security.
Enterprise deployment strategies
Hybrid approach (SLAAC + Stateless DHCPv6):
- Use SLAAC for address assignment (scalable, resilient)
- Use stateless DHCPv6 for configuration (DNS, domain, NTP)
- Implement RA Guard for security
- Deploy redundant DHCPv6 servers for configuration services
Network design considerations:
# Enterprise RA configuration with security
interface Vlan100
description Corporate LAN
ipv6 address 2001:db8:100::1/64
ipv6 nd managed-config-flag
ipv6 nd other-config-flag
ipv6 nd ra interval 200 180
ipv6 nd ra lifetime 600
ipv6 nd prefix 2001:db8:100::/64 600 300
ipv6 dhcp server CORP-DHCPv6
# Redundant DHCPv6 for high availability
ipv6 dhcp pool CORP-DHCPv6
dns-server 2001:db8:100::53 2001:db8:100::54
domain-name corp.example.com
sntp-server 2001:db8:100::123
Monitoring and management
IPv6 address tracking:
- Implement IPv6 neighbor discovery snooping
- Use network monitoring tools to track address usage
- Deploy IPv6 address management (IPAM) solutions
- Monitor DHCPv6 lease databases for audit trails
Performance monitoring:
# Monitor RA performance
show ipv6 nd ra statistics
show ipv6 nd raguard policy CLIENT-PORTS
# DHCPv6 server statistics
show ipv6 dhcp pool
show ipv6 dhcp statistics
# Neighbor discovery table management
show ipv6 neighbor statistics
clear ipv6 neighbor
Future of IPv6 autoconfiguration
IPv6 autoconfiguration continues to evolve with new standards and deployment experiences.
Emerging standards and technologies
DNS-SD and mDNS integration:
Service discovery protocols increasingly integrate with IPv6 autoconfiguration for zero-configuration networking.
IoT and constrained devices:
Specialized autoconfiguration mechanisms for resource-constrained IoT devices, including 6LoWPAN and Thread networking.
Software-defined networking:
SDN controllers increasingly manage IPv6 autoconfiguration through programmable interfaces and policy engines.
Practical exercises and testing
Use our IP Prefix Calculator to practice IPv6 subnet planning and address allocation for your autoconfiguration deployments:
- Calculate /64 subnets for different VLANs in your organization
- Plan prefix delegation hierarchies for DHCPv6-PD deployments
- Design addressing schemes that support both SLAAC and DHCPv6
- Validate address ranges for DHCPv6 pools and reservations
Lab exercises:
- Configure SLAAC-only network and observe address generation
- Set up DHCPv6 server with both stateful and stateless operation
- Implement RA Guard and test protection against rogue advertisements
- Practice network renumbering using address deprecation
- Troubleshoot common autoconfiguration failures
Key principles for successful IPv6 autoconfiguration
- Understand the trade-offs between SLAAC and DHCPv6 for your environment
- Implement security controls like RA Guard and DHCPv6 Guard
- Plan for redundancy in both RA and DHCPv6 services
- Monitor address allocation patterns and lease utilization
- Test autoconfiguration behavior with different client operating systems
- Document your autoconfiguration policies and troubleshooting procedures
- Consider privacy implications when choosing address generation methods
Your IPv6 autoconfiguration journey
Start by understanding your network's requirements for control versus simplicity. Test both SLAAC and DHCPv6 in lab environments to see how they behave with your specific devices and applications. Consider security requirements early in your planning—IPv6's plug-and-play nature requires thoughtful security controls.
Remember that IPv6 autoconfiguration is designed to make networking easier, not harder. The key is choosing the right combination of mechanisms for each network segment. Use our IP Prefix Calculator to plan your IPv6 addressing strategy and ensure your autoconfiguration deployment has room to grow as your network evolves.
Conclusion
Need to calculate network prefixes? Use our IP Prefix Calculator for instant, accurate results.