DHCPv6 relay agents relay DHCPv6 messages between DHCPv6 clients and servers that reside on different network segments to facilitate dynamic address assignment. This function enables a single DHCPv6 server to serve DHCPv6 clients on different network segments, which reduces costs and facilitates centralized management.
Field |
Encapsulation Description |
---|---|
Source address in the IP header |
Set to the IPv6 global unicast address of the outbound interface. |
Destination address in the IP header |
|
Hop limit in the IP header |
|
Source port number in the UDP header |
Set to 547. |
Destination port number in the UDP header |
Set to 547. |
Hop-count in the Relay-Forward message |
|
Link-address in the Relay-Forward message |
|
Peer-address in the Relay-Forward message |
Set to the source address in the IP header of the received message. |
Field |
Encapsulation Description |
---|---|
Source address in the IP header |
Set to the IPv6 global unicast address of the outbound interface. |
Destination address in the IP header |
Set to the peer-address of the received outer Relay-Reply message. |
Hop limit in the IP header |
Set to 255. |
Source port number in the UDP header |
Set to 547. |
Destination port number in the UDP header |
|
A server uses a Relay-Reply message to return a response to a client if the original message from the client was relayed to the server in the Relay Message option of a Relay-Forward message.
If a server does not have an address it can use to send a Reconfigure message directly to a client, the server encapsulates the Reconfigure message into the Relay Message option of a Relay-Reply message to be relayed by the relay agent to the client.
The Relay-Reply message must be relayed through the same relay agents as the original client message. The server must be able to obtain the addresses of the client and all relay agents on the return path so it can construct the appropriate Relay-Reply message carrying the response.
Figure 1 illustrates how a DHCPv6 client applies for an IP address to a DHCPv6 server through a DHCPv6 relay agent for the first time.
The DHCPv6 client sends a Solicit message to discover servers. The DHCPv6 relay agent that receives the Solicit message constructs a Relay-Forward message with the Solicit message in the Relay Message option and sends the Relay-Forward message to the DHCPv6 server.
After the DHCPv6 server receives the Relay-Forward message, it parses the Solicit message and constructs a Relay-Reply message with the Advertise message in the Relay Message option. The DHCPv6 server then sends the Relay-Reply message to the DHCPv6 relay agent. The DHCPv6 relay agent parses the Relay Message option in the Relay-Reply message and sends the Advertise message to the DHCPv6 client.
The DHCPv6 client then sends a Request message to request IP addresses and other configuration parameters. The DHCPv6 relay agent constructs a Relay-Forward message with the Request message in the Relay Message option and sends the Relay-Forward message to the DHCPv6 server.
After the DHCPv6 server receives the Relay-Forward message, it parses the Request message and constructs a Relay-Reply message with the Reply message in the Relay Message option. The Reply message contains the assigned IPv6 address and other configuration parameters. The DHCPv6 server then sends the Relay-Reply message to the DHCPv6 relay agent. The DHCPv6 relay agent parses the Relay Message option in the Relay-Reply message and sends the Reply message to the DHCPv6 client.
A DHCPv6 relay agent sends the Interface-ID option to identify the interface on which the client message was received. A DHCPv6 server uses the Interface-ID option for parameter assignment policies. The server must copy the Interface-ID option from the Relay-Forward message into the Relay-Reply message the server sends to the relay agent in response to the Relay-Forward message. The Interface-ID option applies only to Relay-Forward and Relay-Reply messages.
A DHCPv6 relay agent sends the Remote-ID option to carry additional information, such as the DUID, port identifier, and VLAN ID. A DHCPv6 server uses the Remote-ID option to determine the addresses, delegated prefixes, and configuration parameters to assign to clients.
A DHCPv6 relay agent sends the Subscriber-ID option to carry the client's physical information, such as the MAC address. A DHCPv6 server uses the Subscriber-ID option to determine the addresses, delegated prefixes, and configuration parameters to assign to clients.
On a hierarchical network, IPv6 addresses are generally configured manually, which limits extensibility and prevents uniform IPv6 address planning and management. Standard protocols provide a delegation mechanism, DHCPv6 Prefix Delegation (PD), which automates the process of assigning prefixes to networking equipment on the customer's premises.
On the network shown in Figure 2, IPv6 prefixes do not need to be manually configured for the CPEs. The DHCPv6 prefix delegation mechanism allows a CPE to apply for IPv6 prefixes by sending DHCPv6 messages carrying the IA_PD option to the DHCPv6 server. After the DHCPv6 server assigns a prefix that has less than 64 bits to the CPE, the CPE automatically subnets the delegated prefix into /64 prefixes and assigns the /64 prefixes to the user network through RA messages. This mechanism implements automatic configuration of IPv6 addresses for IPv6 hosts and hierarchical IPv6 prefix delegation.
If a DHCPv6 relay agent is deployed to forward DHCPv6 messages between CPEs (DHCPv6 clients) and the DHCPv6 server, the DHCPv6 relay agent must set up routes to the network segments on which the clients reside and advertises these network segments after the DHCPv6 server assigns PD prefixes to the clients. Otherwise, core network devices cannot learn the routes destined for the CPEs, and IPv6 hosts cannot access the network. If a client sends a Release message to the server to return a delegated prefix, or the lease of a delegated prefix is not extended after expiration, the DHCPv6 relay agent deletes the network segment of the client.