Stateless DHCPv6 is a mode of DHCP for IPv6 in which the client obtains its IP address and default gateway through Router Advertisements (RA), but uses the DHCPv6 server to acquire other configuration details, such as DNS servers, NTP servers, or domain search lists. Unlike stateful DHCPv6, the server does not track or assign IP addresses, making it “stateless.”
Table of Contents
Stateless DHCPv6 in IPv6
In the previous lesson, we learned how clients obtain an IPv6 address and a default gateway using Router Advertisements (RA). In this section, we will explore stateless DHCPv6, which allows clients to receive additional information, such as DNS servers and domain names.
As we covered earlier, in IPv6, the router informs the client how to obtain dynamic configuration details using flags in Router Advertisement messages. To instruct the client to obtain additional information via DHCPv6, we need to enable the “O” (Other Information) flag on the router by using the ipv6 nd
other-config-flag
command.
Stateless DHCPv6 Demonstration
To demonstrate the implementation of stateless DHCPv6, I have prepared a topology with two IOS routers—one acting as the router and the other as the client, connected via the eth0/0
interface. The link-local address is manually configured as fe80::1
, and both a globally unique address and a unique local address are assigned. We also enable the ipv6
unicast-routing
command to ensure the router sends Router Advertisements (RA).
!
interface Ethernet0/0
no shutdown
ipv6 address FE80::1 link-local
ipv6 address 2001:AA:BB:CC::1/64
ipv6 address FD00:AA:BB:CC::1/64
By default, the A (autoconfig) flag is enabled for both prefixes, allowing the client to automatically obtain an IP address from these prefixes. Next, we will configure the same router as a DHCP server to provide stateless information, such as DNS servers and domain names. To do this, we configure a DHCP pool and then apply the pool to the interface.
We also need to inform the clients that stateless information must be obtained from the DHCP server. For this, we enable the “other-config” flag using the ipv6 nd other-config-flag
command on the same interface.
On the client side, we simply enable the interface and stateless autoconfiguration.
dns-server 2001:AA:100:100::100
domain-name rayka-co.com
!
interface Ethernet0/0
ipv6 nd other-config-flag
ipv6 dhcp server STATELESS-DHCPv6
no shutdown
ipv6 address autoconfig
ipv6 enable
Verify Stateless DHCPv6
Using the command show
ipv6 interface eth0/0
, you’ll see that the router has joined the multicast groups FF02::1:2
and FF05::1:3
, which are used by the DHCP server to listen for client communications in the link-local and site-local scopes.
At the end of the output, you’ll see the message “Hosts use stateless autoconfig for addresses“, indicating that the “A” flag is set and clients are using stateless autoconfiguration to obtain IPv6 addresses. You’ll also see “Hosts use DHCP to obtain other configuration“, which shows that the “O” flag is enabled, instructing clients to obtain other stateless information from the DHCP server.
...
Joined group address(es):
...
FF02::1:2
FF05::1:3
...
Hosts use stateless autoconfig for addresses.
Hosts use DHCP to obtain other configuration.
By using the command show ipv6 interface brief
, we can verify that the client has obtained IPv6 addresses from both prefixes.
Ethernet0/0 [up/up]
FE80::A8BB:CCFF:FE00:200
2001:AA:BB:CC:A8BB:CCFF:FE00:200
FD00:AA:BB:CC:A8BB:CCFF:FE00:200
Additionally, the command show ipv6 route
allows us to confirm that the default gateway is set to fe80::1
, which is the link-local address of the router.
IPv6 Routing Table - default - 6 entries
...
ND ::/0 [2/0]
via FE80::1, Ethernet0/0
Unfortunately, I am not aware of a command in IOS routers to directly verify that the client has obtained the domain name and DNS servers.
However, to ensure that the router is sending Router Advertisements (RA) with both the “A” (Autoconfig) and “O” (Other Configuration) flags enabled, we can capture the traffic on the link between the router and the client.