The IPv6 node obtains addresses and other configuration parameters (such as the IPv6 address of the DNS server) through stateful DHCPv6 autoconfiguration.
A DHCPv6 server assigns addresses and prefixes to a DHCPv6 client in the following ways:
DHCPv6 Four-Message Exchange
Four-message exchange applies to a network where multiple DHCPv6 servers are available. A DHCPv6 client first multicasts a Solicit packet to locate DHCPv6 servers that can provide DHCPv6 services. After receiving Advertise packets from multiple DHCPv6 servers, the DHCPv6 client selects one of the DHCPv6 servers according to priorities of DHCPv6 servers. Then the DHCPv6 client and the selected DHCPv6 server complete address application and allocation by exchanging Request and Reply packets.
If a DHCPv6 server does not have two-message exchange enabled, the DHCPv6 server allocates addresses and configuration parameters through four-message exchange, regardless of whether the Solicit packet contains the Rapid Commit option.
Figure 1 shows the process of address allocation using four-message exchange.
The process of address allocation using four-message exchange is as follows:
DHCPv6 Two-Message Exchange
Two-message exchange applies to a network where only one DHCPv6 server is available. A DHCPv6 client multicasts a Solicit packet to locate the DHCPv6 server that can allocate addresses and configuration parameters. After receiving the Solicit packet, the DHCPv6 server responds with a Reply packet carrying addresses and configuration parameters allocated to the DHCPv6 client.
This packet exchange improves address allocation efficiency. On the network where multiple DHCPv6 servers are available, multiple DHCPv6 servers can allocate addresses to DHCPv6 clients and respond with Reply packets. The DHCPv6 clients, however, use the addresses and configuration parameters allocated by one DHCPv6 server. To prevent the preceding situation, the administrator can configure only one DHCPv6 server to support two-message exchange.
Figure 2 shows the process of address allocation using two-message exchange.
The process of address allocation using two-message exchange is as follows:
If the DHCPv6 server does not support fast address allocation, the DHCPv6 server uses four-message exchange to allocate IPv6 addresses, prefixes, and other network configuration parameters.
The IPv6 node obtains network configuration parameters (including configuration parameters of DNS, SIP, and SNTP servers, without IPv6 addresses) through DHCPv6 stateless autoconfiguration.
Figure 3 shows the working process of DHCPv6 stateless autoconfiguration.
The working process of DHCPv6 stateless autoconfiguration is as follows: