Configuring DHCP relay agent

Overview

Since the DHCP clients request IP addresses through broadcast messages, the DHCP server and clients must be on the same subnet. Through a DHCP relay agent, DHCP clients can get IP addresses from a DHCP server on another subnet. This feature avoids deploying a DHCP server for each subnet to centralize management and reduce investment. Figure 272 shows a typical application of the DHCP relay agent.

Figure 272 DHCP relay agent application

The DHCP server and client interact with each other in the same way regardless of whether the relay agent exists (see "DHCP overview"). For more information about DHCP packet exchange, see "IP address allocation process."

The following only describes steps related to the DHCP relay agent:

1.After receiving a DHCP-DISCOVER or DHCP-REQUEST broadcast message from a DHCP client, the DHCP relay agent fills the giaddr field of the message with its IP address and forwards the message to the designated DHCP server in unicast mode.

2.Based on the giaddr field, the DHCP server returns an IP address and other configuration parameters in a response.

3.The relay agent conveys the response to the client.

297