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.
- 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-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. Refer to the Configuring an IPv6 address for the Router Interface section for more information.
- Enter global configuration mode by issuing the
configure terminalcommand. - 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 to assign IPv6 addresses in the specified range. - Enter the
exitcommand until you return to global configuration mode. - Enter the
ipv6 addresscommand, specifying an IPv6 address, to configure an IPv6 address in the range of the configured subnet6.
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.