Configuring the Stateful DHCPv6 Server on Layer 2 Software Images

Perform the following steps to configure a stateful DHCPv6 server on a Layer 2 software image.
Consider the following when configuring the stateful DHCPv6 server on Layer 3 software images:
  • For stateful DHCPv6 servers, one DHCPv6 subnet can be configured on the management VLAN.
  • For stateful DHCPv6 Servers, the client requires the DHCPv6 server to get the IPv6 address and other information such as DNS and domain-name.
  • The configuration of the nd managed address configuration flag, using the ipv6 nd managed-config-flag command is required for stateful DHCPv6 servers. When the ipv6 nd managed-config-flag command is used, the M flag is set to 1.
  • The IPv6 address is assigned by the DHCPv6 server, and the lease entry can be viewed on the server in the output of the show ipv6 dhcp6-server lease command. Refer to the Configuring an IPv6 address for the Router Interface section for more information.
  1. Enter global configuration mode by issuing the configure terminal command.
    switch# configure terminal
  2. Enter the ipv6 dhcp6-server enable command to enable the DHCPv6 server.
    switch(config)# ipv6 dhcp6-server enable
  3. Enter the domain-name command, entering a domain name, to configure the domain name server (DNS) domain name.
    switch(config-dhcp6)# domain-name example.com
  4. Enter the dns-server command, specifying an IPv6 address, to specify the IPv6 address of the DNS server.
    switch(config-dhcp6)# dns-server 8fef:400:efdd:301::10  8fef:400:efdd:301::20
  5. Enter the renewal-time command, specifying an interval, to set the time interval after which the client transitions to the renewing state upon receipt of an IPv6 address.
    switch(config-dhcp6)# renewal-time 50 
    If the renewal time is not configured, half of the valued of the configured preferred lifetime is considered as the renewal time.
  6. Enter the subnet6 command, specifying an IPv6 prefix, to configure a subnet for the DHCPv6 server and enter DHCPv6 subnet configuration mode.
    switch(config-dhcp6)# subnet6 8fef:400:efdd:301::/64
    
  7. Enter the range6 command to assign IPv6 addresses in the specified range.
    switch(config-dhcpv6-subnet)# range6 8fef:400:efdd:301::100 8fef:400:efdd:301::200 
  8. Enter the exit command until you return to global configuration mode.
    switch(config-dhcpv6-subnet)# exit
    switch(config-dhcp6)# exit
    switch(config)#
    
  9. Enter the ipv6 address command, specifying an IPv6 address, to configure an IPv6 address in the range of the configured subnet6.
    switch(config)# ipv6 address 8fef:400:efdd:301::3/64 

The following example configure a stateful DHCPv6 server on a Layer 2 software image and configures an IPv6 address in the range of the configured subnet6.

switch# configure terminal
switch(config)# ipv6 dhcp6-server enable
switch(config-dhcp6)# domain-name example.com
switch(config-dhcp6)# dns-server 8fef:400:efdd:301::10  8fef:400:efdd:301::20
switch(config-dhcp6)# renewal-time 50 
switch(config-dhcp6)# subnet6 8fef:400:efdd:301::/64
switch(config-dhcpv6-subnet)# range6 8fef:400:efdd:301::100 8fef:400:efdd:301::200
switch(config-dhcpv6-subnet)# exit
switch(config-dhcp6)# exit
switch(config)# ipv6 address 8fef:400:efdd:301::3/64 

Follow the steps in the Configuring an IPv6 address for the Router Interface section to configure an IPv6 address on the router interface.