Home CCNA Master Stateless DHCPv6 Server Configuration – A Complete Cisco Guide
Diagram showing stateless DHCPv6 server configuration commands on a Cisco router interface

Master Stateless DHCPv6 Server Configuration – A Complete Cisco Guide

Before a stateless DHCPv6 server is configured on the Cisco router, it is important to enable IPv6 unicast routing. The unicast routing is not necessary for stateless DHCPv6 servers, but it is required for RA messages due to the use of ICMPv6. In global configuration mode, we can enable the IPv6 unicast routing using the “ipv6 unicast-routing” command. Other steps for configuring stateless DHCPv6 are the following:

Configure a DHCPv6 Pool

Just like the DHCPv4 IP addressing pool, we need the IPv6 addressing pool. To configure the IPv6 DHCP pool, we used ipv6 dhcp pool <pool-name> command in global configuration mode. Executing this command, we also enter into the DHCPv6 configuration mode, which is identified by the Router(config-dhcpv6)#

Configure Pool Parameters

The RA message contains the prefix, prefix length, and default gateway information. The client creates its global unicast address from the information in the RA message and configures its default gateway address, which is the router’s link-local address. The DHCPv6 server can be configured for providing additional information that is not included in the RA message, for example, DNS server address and domain name, etc

Configure the DHCPv6 Interface

After creating the IPv6 addressing pool, we need to bind the pool to the corresponding interface. The interface configuration mode command “ipv6 dhcp server <pool-name> binds the DHCPv6 pool to the interface.

When a router receives a DHCPv6 request on this interface, it replies with the information configured in the pool. The O flag must be set to 1 and the M flag to 0 for the stateless DHCPv6. The interface mode command ipv6 nd other-config-flag command is used to configure the O flag to 1. RA messages send on this interface with M flag 0 and O flag 1 indicate that additional information is available from a stateless DHCPv6 server.

Example Command of DHCPv6 Stateless

The example configuration topology for the stateless DHCPv6 server on the Cisco router is illustrated in the following figure.

Topology to illustrates Stateless DHCPv6 Server configuration
DHCPv6_SERVER#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
DHCPv6_SERVER(config)#ipv6 unicast-routing
DHCPv6_SERVER(config)#ipv6 dhcp pool DHCPv6-POOL
DHCPv6_SERVER(config-dhcpv6)#address prefix 2001:ABCD:1::/64
DHCPv6_SERVER(config-dhcpv6)#dns-server 2001:ABC1:B001:0001::20
DHCPv6_SERVER(config-dhcpv6)#domain-name networkustad.com
DHCPv6_SERVER(config-dhcpv6)#exit
DHCPv6_SERVER(config)#interface gig0/1
DHCPv6_SERVER(config-if)#ipv6 address 2001:ABCD:1::1/64
DHCPv6_SERVER(config-if)#ipv6 nd other-config-flag
DHCPv6_SERVER(config-if)#ipv6 dhcp server DHCPv6-POOL
DHCPv6_SERVER(config-if)#exit
DHCPv6_SERVER(config)#exit
DHCPv6_SERVER#wr
Building configuration...
[OK]
DHCPv6_SERVER#

Configure Cisco Router as a Stateless DHCPv6 Client

Previously, we configured the Cisco Router as a DHCPv4 client, but now, we will configure it as a DHCPv6 client. A DHCPv6 client is typically a computer, tablet, mobile device, or webcam, not a router.

A router configured as a DHCPv6 client needs an IPv6 link-local address on the interface. The router cannot send and receive IPv6 messages without a link-local address, such as RS and DHCPv6 messages.

When the IPv6 address is enabled on the interface, the link-local address is automatically created. This is possible when configuring a global unicast address on the interface or using the “ipv6 enable” command. When the router creates a link-local address, it can send RS messages and participate in the DHCPv6 process.

We will use the ipv6 enable command because the router does not yet have a global unicast address, and we want to configure the global unicast address from DHCPv6.

The next command for configuring a DHCPv6 client is “ipv6 address autoconfig”. This command enables the automatic configuration of IPv6 addressing using SLAAC. An RA message then informs the client router to use stateless DHCPv6 for address configuration. Below is the configuration of the DHCPv6 client on the Cisco router.

DHCPv6_Client#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
DHCPv6_Client(config)#interface gig0/1
DHCPv6_Client(config-if)#ipv6 enable
DHCPv6_Client(config-if)#ipv6 address autoconfig
DHCPv6_Client(config-if)#exit
DHCPv6_Client(config)#exit
DHCPv6_Client#

Verifying Stateless DHCPv6

We can verify the DHCPv6 server configuration using several commands. The figure below illustrates the output of the command “show ipv6 dhcp pool”. The output of the command verifies the name of the DHCPv6 pool and its parameters. The number of active clients is 0 because there is no state being maintained by the server.

DHCPv6_SERVER#show ipv6 dhcp pool
DHCPv6 pool: mypool
  DNS server: 2001:ABC1:B001:1::20
  Domain name: networkustad.com
  Active clients: 0
DHCPv6_SERVER#

We can also use the show running-config command to verify all the commands that were previously configured.

Verifying the Stateless DHCPv6 Client

We have configured the stateless DHCPv6 client. We can verify the client and server configurations from the client. The command show ipv6 interface is used to verify that the router is configured with ”Stateless address autoconfig enabled“ and has an IPv6 global unicast address. We can also verify the configuration using the show running-config command. Another command to verify the configuration is debug ipv6 dhcp detail. The command shows the DHCPv6 messages exchanged between the client and the server.

FAQs

What is stateless DHCPv6?

Stateless DHCPv6 provides additional configuration info like DNS and domain name via DHCPv6, while IP addressing is handled by SLAAC using RA messages.

Which flags are used for stateless DHCPv6?

The O flag is set to 1 and the M flag to 0 in RA messages to indicate that additional info is available from a stateless DHCPv6 server.

How do you bind a DHCPv6 pool to an interface?

Use the command ipv6 dhcp server POOL-NAME in interface config mode to bind the DHCPv6 pool to the router interface.

How can you verify stateless DHCPv6 configuration?

Use show ipv6 dhcp pool, show ipv6 interface, and debug ipv6 dhcp detail to verify server and client configurations.

What command enables IPv6 autoconfig on a client router?

The ipv6 address autoconfig command allows the router to use SLAAC and stateless DHCPv6 for IPv6 address configuration.

🏆 Your Progress

Level 1
🔥 0 day streak
📚
0 Articles
0 Points
🔥
0 Current
🏅
0 Best Streak
Level Progress 0 pts to next level
🎖️ Achievements
🥉 Starter
🥈 Reader
🥇 Scholar
💎 Expert

More from CCNA

Articles tailored to your interests in CCNA

Forum