Configuring the Stateful DHCPv6 Server on Layer 3 Software Images
Perform the following steps to configure a stateful DHCPv6 server on a Layer 3 software
image.
- For stateful DHCPv6 servers, up to 100 DHCPv6 subnets can be configured with a Layer 3 software image only.
- 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-flagcommand is required for stateful DHCPv6 servers. When theipv6 nd managed-config-flagcommand 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 leasecommand.
- Enter global configuration mode by issuing the
configure terminalcommand. - Enter the
ipv6 unicast-routingcommand to enable the forwarding of IPv6 traffic. - Enter the
ipv6 dhcp6-server enablecommand to enable the DHCPv6 server. - Enter the
domain-namecommand, entering a domain name, to configure the domain name server (DNS) domain name. - Enter the
dns-servercommand, specifying an IPv6 address, to specify the IPv6 address of the DNS server. - Enter the
renewal-timecommand, specifying an interval, to set the time interval after which the client transitions to the renewing state upon receipt of an IPv6 address.If the renewal time is not configured, half of the valued of the configured preferred lifetime is considered as the renewal time. - Enter the
subnet6command, specifying an IPv6 prefix, to configure a subnet for the DHCPv6 server and enter DHCPv6 subnet configuration mode. - Enter the
range6command, specifying IPv6 addresses, to assign IPv6 addresses in the specified range. - Enter the
exitcommand until you return to global configuration mode. - Enter the
vlancommand and enter a VLAN ID to create a VLAN. - Enter the
untaggedcommand 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. - Enter the
router-interfacecommand, specifying an interface, to attach a router interface to the VLAN. - Enter the
exitcommand to return to global configuration mode. - Enter the
interface vecommand specifying the configured VLAN. - Enter the
ipv6 addresscommand, specifying an IPv6 address, to configure an IPv6 address on the server interface in the range of the configured subnet6. - Enter the
ipv6 nd managed-config-flagcommand to enable the hosts to use autoconfiguration to get non-IPv6-address information.
The following example enables IPv6 unicast routing, configures a stateful 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 managed-config-flag command is used to set the M 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)# router-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 managed-config-flag