Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

DHCPv6 on Cisco IOS: stateless and stateful servers, relay and prefix delegation

In short: IPv6 hosts learn how to configure themselves from Router Advertisements. The O flag says "ask DHCPv6 for extra settings such as DNS", and the M flag says "get your address from DHCPv6". Cisco IOS can act as a stateless or stateful DHCPv6 server, relay requests to a central server, and request a delegated prefix from an ISP.

The router decides the method

In IPv4 a host simply broadcasts for DHCP. In IPv6 the host first listens for a Router Advertisement (RA) and reads its flags:

  • A (autonomous) flag on the prefix: the host may build its own address with SLAAC.
  • O (other config) flag: the host should ask DHCPv6 for other settings such as DNS servers and domain name. This is stateless DHCPv6, because the server does not track addresses.
  • M (managed) flag: the host should get its address from DHCPv6. This is stateful DHCPv6.
How an IPv6 host gets its settingsRouter AdvertisementflagsSLAAC onlyA=1, M=0, O=0SLAAC + statelessDHCPv6A=1, O=1 (DNS)Stateful DHCPv6M=1, A=0Prefix delegationrouter to router
Figure 1. The RA flags tell the host which method to use. The router and the DHCPv6 server must agree.

Stateless DHCPv6 server

ipv6 dhcp pool STAFF-INFO
 dns-server 2001:db8:10:5::53
 domain-name example.local
!
interface GigabitEthernet0/0
 ipv6 address 2001:db8:10:1::1/64
 ipv6 nd other-config-flag
 ipv6 dhcp server STAFF-INFO

Hosts build their own address with SLAAC and ask the router only for DNS. This is the most common setup in small networks. Note that modern Windows, macOS, Linux and iOS also read DNS servers straight from the RA if you add ipv6 nd ra dns server, and Android does not support stateful DHCPv6 addressing at all, so it relies on SLAAC and RA DNS.

Stateful DHCPv6 server

ipv6 dhcp pool STAFF-ADDR
 address prefix 2001:db8:10:1::/64 lifetime 172800 86400
 dns-server 2001:db8:10:5::53
 domain-name example.local
!
interface GigabitEthernet0/0
 ipv6 address 2001:db8:10:1::1/64
 ipv6 nd managed-config-flag
 ipv6 nd prefix 2001:db8:10:1::/64 no-autoconfig
 ipv6 dhcp server STAFF-ADDR

The no-autoconfig keyword clears the A flag so that hosts do not also create a SLAAC address. Remember that the default gateway is never given by DHCPv6. Hosts always learn it from the RA, so the router must still send RAs.

DHCPv6 relay

In larger networks a central server (Windows Server, Infoblox, Kea) hands out settings, and each VLAN interface relays requests to it:

interface Vlan20
 ipv6 address 2001:db8:10:20::1/64
 ipv6 nd managed-config-flag
 ipv6 dhcp relay destination 2001:db8:10:5::10

Prefix delegation from an ISP

Many ISPs give a customer router a prefix, such as a /56, with DHCPv6 prefix delegation (PD). The router then carves /64s out of it for each LAN:

interface GigabitEthernet0/2
 description To ISP
 ipv6 address autoconfig default
 ipv6 dhcp client pd ISP-PREFIX
interface GigabitEthernet0/0
 ipv6 address ISP-PREFIX ::1:0:0:0:1/64

Real-world example: printers without addresses

An office switched a printer VLAN to stateful DHCPv6 so it could reserve addresses. Laptops worked, but half the printers lost IPv6 connectivity. The router was still advertising the prefix with the A flag set, so some printers ignored DHCPv6 and used SLAAC, while others only did DHCPv6 and never got a gateway because RAs on that VLAN had been suppressed by mistake. Re-enabling RAs and adding no-autoconfig made every device follow the same method.

Practice

Which RA flag tells hosts to get only DNS and other settings from DHCPv6?
The O (other config) flag.
Does DHCPv6 give hosts a default gateway?
No. Hosts always learn the default gateway from Router Advertisements.
What does ipv6 dhcp relay destination do?
It forwards DHCPv6 requests received on that interface to a central DHCPv6 server.

Key takeaways

  • RA flags (A, O and M) tell hosts whether to use SLAAC, stateless or stateful DHCPv6.
  • Stateless DHCPv6 gives DNS and options; stateful DHCPv6 also assigns addresses.
  • The default gateway always comes from the RA, never from DHCPv6.
  • Relays send requests to a central server; prefix delegation hands a block to a router.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: