DHCPv6 Basics
DHCPv6 runs between a client and a server. Similar to DHCP for
IPv4, DHCPv6 clients and DHCPv6 servers exchange DHCPv6 packets using
the User Datagram Protocol (UDP). In IPv6, packets cannot be broadcast;
therefore, DHCPv6 uses multicast packets. In this case, DHCPv6 clients
do not need to be configured with IPv6 addresses of DHCPv6 servers.
IPv6 Address Allocation Methods
The IPv6
protocol provides huge address space formed by 128-bit IPv6 addresses
that require proper and efficient assignment and management policies.
Currently, the following methods are available to allocate IPv6 addresses:
- Manual configuration: You can manually configure IPv6 addresses,
prefixes, and other network configuration parameter, such as addresses
of the Domain Name System (DNS), Network Information Service (NIS),
and Simple Network Time Protocol (SNTP) servers.
- Stateless address autoconfiguration: Hosts generate a link-local
address based on the interface ID and automatically configure IPv6
addresses based on prefixes carried in Router Advertisement (RA) packets.
- Stateful autoconfiguration, that is DHCPv6, DHCPv6 allocation
has the following two methods:
- DHCPv6 stateful autoconfiguration: DHCPv6 servers automatically
provide IPv6 addresses, PD prefixes, and other network configuration
parameters, such as addresses of the DNS, NIS, and SNTP servers.
- DHCPv6 stateless autoconfiguration: IPv6 addresses are generated
based on RA packets. A DHCPv6 server does not provide IPv6 addresses
but provides other configuration parameters about the DNS, NIS, and
SNTP servers.
DHCPv6 Architecture
Figure 1 shows
the DHCPv6 architecture.
Figure 1 DHCPv6 architecture
DHCPv6 involves the following roles:
- DHCPv6 client
A DHCPv6 client applies to a DHCPv6 server for
IPv6 addresses, prefixes, and network configuration parameters to
complete its address configuration.
- DHCPv6 relay
A DHCPv6 relay agent relays DHCPv6 packets between
a DHCPv6 client and a DHCPv6 server to help the DHCPv6 client complete
its address configuration. Generally, a DHCPv6 client communicates
with a DHCPv6 server through the link-local multicast address to obtain
IPv6 addresses, prefixes, and other network configuration parameters.
If a DHCPv6 server and a DHCPv6 client are on different links, a DHCPv6
relay agent is required to forward DHCPv6 packets. In this case, you
do not need to deploy a DHCPv6 server on each link, which saves costs
and facilitates centralized management.
A DHCPv6 relay agent
is optional. If a DHCPv6 client and a DHCPv6 server are on the same
link or a DHCPv6 client communicates with a DHCPv6 server in unicast
mode to complete address allocation or information configuration,
you do not need to deploy a DHCPv6 relay agent. A DHCPv6 relay agent
is required only when a DHCPv6 client and a DHCPv6 server are located
on different links or a DHCPv6 client cannot communicate with a DHCPv6
server in unicast mode.
- DHCPv6 server
A DHCPv6 server processes requests of address
allocation, address lease extension, and address release from a DHCPv6
client or a DHCPv6 relay agent, and assigns IPv6 addresses and other
network configuration parameters to the DHCPv6 client.
Basic DHCPv6 Concepts
- Multicast address
- In DHCPv6, a DHCPv6 client does not need to be configured with
the IPv6 address of a DHCPv6 server. Instead, the DHCPv6 client locates
DHCPv6 servers by sending Solicit packets with multicast addresses
as destination addresses.
- In DHCPv4, a DHCP client locates DHCP servers by broadcasting
DHCP packets. To prevent broadcast storms, IPv6 does not use broadcast
packets. Instead, IPv6 uses multicast packets. DHCPv6 uses the following
two multicast addresses:
- FF02::1:2 (All DHCP Relay Agents and Servers): indicates the multicast
address of all the DHCPv6 servers and DHCPv6 relay agents. The address
is a link-local multicast address and is used for communication between
a DHCPv6 client and its neighboring servers or between a DHCPv6 client
and DHCPv6 relay agents. All DHCPv6 servers and relay agents are members
of this multicast group.
- FF05::1:3 (All DHCP Servers): indicates the multicast address
of all the DHCPv6 servers. The address is a site-local address and
is used for communication between DHCPv6 relay agents and DHCPv6 servers
within a site. All DHCPv6 servers within a site are members of this
multicast group.
- UDP port number
- DHCPv6 packets are transmitted through UDPv6.
- DHCPv6 clients only process DHCPv6 packets with UDP port number
546.
- DHCPv6 servers and relay agents only process DHCPv6 packets with
UDP port number 547.
- DHCPv6 Unique Identifier (DUID)
- A DUID identifies a DHCPv6 device. Each DHCPv6 server or client
has a unique DUID. DHCPv6 servers use DUIDs to identify DHCPv6 clients
and DHCPv6 clients use DUIDs to identify DHCPv6 servers.
- The DUIDs of a DHCPv6 client and a DHCPv6 server are carried in
the Client Identifier option and the Server Identifier option respectively.
The Client Identifier option and the Server Identifier option have
the same format and are distinguished by the option-code field value.
- Identity association (IA)
- An IA enables a DHCPv6 server and a DHCPv6 client to identify,
group, and manage IPv6 addresses. Each IA consists of an identity
association identifier (IAID) and associated configuration information.
- A DHCPv6 client must associate at least one IA with each of its
network interfaces for which the DHCPv6 client requests IPv6 addresses
from a DHCP server. The DHCPv6 client uses IAs associated with network
interfaces to obtain configuration information from a DHCPv6 server.
Each IA must be associated with at least one interface.
- The IAID identifies an IA, and IAIDs on the same DHCPv6 client
must be unique. The IAID is not lost or changed because of factors
such as DHCPv6 client reboot.
- The configuration information in an IA consists of one or more
IPv6 addresses along with the lifetimes T1 and T2. Each address in
an IA has a preferred lifetime and a valid lifetime.
- An interface must be associated with at least one IA; an IA can
contain information about one or more addresses.