Similar to DHCP messages, DHCPv6 messages are also carried over UDP, with UDP port 546 assigned to DHCPv6 clients and UDP port 547 assigned to DHCPv6 relay agents and servers.
IPv6 does not support broadcast packets, and therefore DHCPv6 clients use multicast IPv6 packets for communication. DHCPv6 clients use the multicast address FF02::1:2 to communicate with DHCPv6 relay agents and servers. DHCPv6 relay agents and servers use the multicast address FF05::1:3 to communicate with each other.
DHCPv6 messages share an identical fixed format header and a variable format area for options.
DHCPv6 message types
Unlike DHCP messages, DHCPv6 messages use the msg-type field in the header to identify the message type. Table 1 lists the DHCPv6 message types.
Type |
Code |
Description |
---|---|---|
SOLICIT |
1 |
A client sends a Solicit message to locate servers. |
ADVERTISE |
2 |
A server sends an Advertise message in response to a Solicit message received from a client to indicate that it is available for DHCPv6 services. |
REQUEST |
3 |
A client sends a Request message to request IP addresses and other configuration parameters from a server. |
CONFIRM |
4 |
A client sends a Confirm message to any available server to determine whether the IP addresses it was assigned are still applicable to the link to which the client is connected. |
RENEW |
5 |
A client sends a Renew message to the server that provided the client's addresses and other configuration parameters to extend the lease of the IP addresses assigned to the client and to update other configuration parameters. |
REBIND |
6 |
A client sends a Rebind message to any available server to extend the lease of the IP addresses assigned to the client and to update other configuration parameters. This message is sent if a client does not receive a response to a Renew message. |
REPLY |
7 |
A server sends a Reply message in the following scenarios:
|
RELEASE |
8 |
A client sends a Release message to the server that assigned addresses to the client to indicate that the client will no longer use one or more of the assigned addresses. |
DECLINE |
9 |
A client sends a Decline message to a server to indicate that the client has determined that one or more addresses assigned by the server are already in use on the link to which the client is connected. |
RECONFIGURE |
10 |
A server sends a Reconfigure message to a client to inform the client that the server has new or updated configuration parameters. |
INFORMATION-REQUEST |
11 |
A client sends an Information-Request message to a server to request configuration parameters without any IP addresses. |
RELAY-FORW |
12 |
A relay agent sends a Relay-Forward message to relay messages to servers. |
RELAY-REPLY |
13 |
A server sends a Relay-Reply message to a relay agent containing a message that the relay agent delivers to a client. |
DHCPv6 message format
DHCPv6 client/server message format
Figure 1 shows the DHCPv6 client/server message format.
Table 2 describes fields in a DHCPv6 client/server message.
Field |
Length |
Description |
Value |
---|---|---|---|
msg-type |
1 byte |
DHCP message type |
The value ranges from 1 to 11. The available message types are listed in Table 1. |
transaction-id |
3 bytes |
Transaction ID for this message exchange, indicating one exchange of DHCPv6 messages |
- |
options |
Variable |
Options carried in this message |
- |
DHCPv6 relay agent/server message format
Figure 2 shows the relay agent/server message format.
Only Relay-Forward and Relay-reply messages are exchanged between DHCPv6 relay agents and servers. Figure 3 lists the fields of a DHCPv6 relay agent/server message.
Field |
Length |
Usage 1 |
Usage 2 |
---|---|---|---|
msg-type |
1 byte |
RELAY-FORW |
RELAY-REPL |
hop-count |
1 byte |
Number of relay agents that have relayed this message |
Copied from the Relay-Forward message |
link-address |
16 bytes |
An IPv6 global unicast or link-local address that will be used by the server to identify the link to which the client is connected |
Copied from the Relay-Forward message |
peer-address |
16 bytes |
IP address of the client or relay agent from which the message to be relayed was received |
Copied from the Relay-Forward message |
options |
Variable |
Must include the Relay Message option; may include other options added by the relay agent |
Must include the Relay Message option; may include other options |
DHCPv6 options format
DHCPv6 relay options
A Relay-Forward or Relay-Reply message must have a Relay Message option (Option 9) that carries a DHCPv6 message.
DHCPv6 relay Interface-ID option (Option 18), Remote-ID option (Option 37), and Subscriber-ID option (Option 38) have the same functions as DHCP relay Option 82. These DHCPv6 options are added by DHCPv6 relay agents in Relay-Forward messages for DHCPv6 servers. Servers use these options to learn the location of DHCPv6 clients, implement client security and accounting, and make parameter assignment policies, allowing for more flexible address assignment.
Table 5 lists the DHCPv6 relay options.
Option |
Options ID |
Description |
---|---|---|
Relay Message |
9 |
Carries a DHCPv6 message. |
Interface-ID |
18 |
Identifies the interface on which the client message was received. |
Remote-ID |
37 |
Carries additional information, such as the DHCP Unique Identifier (DUID), port identifier, and VLAN ID. |
Subscriber-ID |
38 |
Carries the client's physical information, such as the MAC address. |