Configuring the Stateless DHCPv6 Server on Layer 3 Software Images

Perform the following steps to configure a stateless DHCPv6 server on a Layer 3 software image.
Consider the following when configuring the stateless DHCPv6 server on Layer 3 software images:
  • For stateless DHCPv6 servers, up to 100 DHCPv6 subnets can be configured with a Layer 3 software image only.
  • In SLAAC (Stateless Address Auto-configuration), the client does not require the DHCPv6 server to get the IPv6 address. It receives the prefix, prefix-length, and the Default Gateway from the RA and the address is auto-configured.
  • The DHCPv6 client can only get other information, such as DNS and domain-name, from the DHCPv6 server.
  • The configuration of the nd other-config-flag, using the ipv6 nd other-config-flag command, is required for the stateless DHCPv6 server to receive DNS and domain name configuration. When the ipv6 nd other-config-flag command is used, the O flag is set to 1.
  • When the client sends an Information-Request to the server, the server replies with information such as domain-name and DNS server.
  • Since the IPv6 address is not assigned by the DHCPv6 server, the lease entry is not seen on the server.
  1. Enter global configuration mode by issuing the configure terminal command.
    router# configure terminal
  2. Enter the ipv6 unicast-routing command to enable the forwarding of IPv6 traffic.
    router(config)# ipv6 unicast-routing
  3. Enter the ipv6 dhcp6-server enable command to enable the DHCPv6 server.
    router(config)# ipv6 dhcp6-server enable
  4. (Optional) Enter the domain-name command, entering a domain name, to configure the domain name server (DNS) domain name.
    router(config-dhcp6)# domain-name example.com
  5. (Optional) Enter the dns-server command, specifying an IPv6 address, to specify the IPv6 address of the DNS server.
    router(config-dhcp6)# dns-server 8fef:400:efdd:301::10  8fef:400:efdd:301::20
  6. 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.
    router(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.
  7. Enter the subnet command, specifying an IPv6 prefix, to configure a subnet for the DHCPv6 server and enter DHCPv6 subnet configuration mode.
    router(config-dhcp6)# subnet6 8fef:400:efdd:301::/64
    
  8. Enter the range6 command, specifying IPv6 addresses, to assign IPv6 addresses in the specified range.
    router(config-dhcpv6-subnet)# range6 8fef:400:efdd:301::100 8fef:400:efdd:301::200 
  9. Enter the exit command until you return to global configuration mode.
    router(config-dhcpv6-subnet)# exit
    router(config-dhcp6)# exit
    router(config)#
    
  10. Enter the vlan command and enter a VLAN ID to create a VLAN.
    router(config)# vlan 100
  11. Enter the untagged command and specify a port to add an untagged Ethernet port to the port-based VLAN and specify the port connected to the client into one VLAN.
    router(config-vlan-100)# untagged ethernet 1/1/2
  12. Create a virtual routing interface
    router(config-vlan-100)# interface ve 100
  13. Enter the exit command to return to global configuration mode.
    router(config-vlan-100)# exit
  14. Enter the interface ve command specifying the configured VLAN.
    router(config)# interface ve 100
  15. Enter the ipv6 address command, specifying an IPv6 address, to configure an IPv6 address on the server interface in the range of the configured subnet6.
    router(config-vif-100)# ipv6 address 8fef:400:efdd:301::3/64 
  16. Enter the ipv6 nd other-config-flag command to enable the hosts to use autoconfiguration to get non-IPv6-address information.
    router(config-vif-100)# ipv6 nd other-config-flag 

The following example enables IPv6 unicast routing, configures a stateless DHCPv6 server on a Layer 3 software image and configures an IPv6 address on the server interface in the range of the configured subnet6. The ipv6 nd other-config-flag command is used to set the 0 flag to 1.

router# configure terminal
router(config)# ipv6 unicast-routing
router(config)# ipv6 dhcp6-server enable
router(config-dhcp6)# domain-name example.com
router(config-dhcp6)# dns-server 8fef:400:efdd:301::10  8fef:400:efdd:301::20
router(config-dhcp6)# renewal-time 50
router(config-dhcp6)# subnet6 8fef:400:efdd:301::/64
router(config-dhcpv6-subnet)# range6 8fef:400:efdd:301::100 8fef:400:efdd:301::200 
router(config-dhcpv6-subnet)# exit
router(config-dhcp6)# exit
router(config)# vlan 100
router(config-vlan-100)# untagged ethernet 1/1/2
router(config-vlan-100)# interface ve 100
router(config-vlan-100)# exit
router(config)# interface ve 100
router(config-vif-100)# ipv6 address 8fef:400:efdd:301::3/64
router(config-vif-100)# ipv6 nd other-config-flag