DHCPv6 is a network protocol that works pretty much the same as DHCP in IPv4.
DHCPv6 is used to assign ip addresses and prefix to IPv6 hosts on a network. This is also known as a stateful autoconfiguration.
How DHCPv6 Works.
DHCPv6 works in two ways; Stateful and Stateless Address Autoconfiguration (SLAAC).
Stateless Address Autoconfiguration (SLAAC)
SLACC requires no manual configuration of hosts, minimal configuration of routers, and no additional servers.
DHCP clients autoconfigure their own IPv6 address based on router advertisements. Routers advertise prefixes that identify the subnet(s) associated with a link, while hosts generate an “interface identifier” that uniquely identifies an interface on a subnet.
DHCP clients uses the DHCP server to obtain the other useful configuration information (such as the address of DNS servers).
By using the eui-64 command, a host can automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP.
This approach is used when a network is not concerned with the exact addresses hosts use on a network so long as they are unique and routable.
In Stateful DHCP, the adddress assignment is centrally managed and clients must obtain configuration information such as address autoconfiguration and neighbor discovery that is not available through protocols.
DHCPv6 can be implemented in two ways:
Rapid Commit – DHCP client obtains configuration parameters from the server through a rapid two message exchange (solicit and reply).
Normal Commit – DHCP client uses four message exchanges (solicit, advertise, request and reply).
By default normal-commit is used.
In order to use the rapid-commit option, it has to be enabled by both client and server so that it uses the two-message exchange.
DHCPv6 Messages Types
There are 3 DHCPv6 message types exclusive to only DHCPv6:
This happens when a client sends a Confirm message to any available server to determine whether the addresses it was assigned are still appropriate to the link to which the client is connected.
This when a relay agent sends a Relay-forward message to relay messages to servers, either directly or through another relay agent.
A server sends a Relay-reply message to a relay agent containing a message that the relay agent delivers to a client.
DHCPV6 Message types
How to Configure DHCPv6 on Cisco router.
R1(config)# ipv6 dhcp pool
R1(config-dhcp)# ipv6 dhcp pool test
R1(config-dhcp)#prefix-delegation pool test lifetime 64000 64000
Assign DHCPv6 to an interface:
R1(config-if)#ipv6 dhcp server test
The above interface configuration is quite different from that of IPv4. Overall, we have configured DHCPv6 server and applied it to an Interface