DHCP relay agent

DHCP relay agent

 Routers block broadcasts instead of forwarding them, so messages cannot reach DHCP servers beyond the router.

To solve this problem, you need to relay DHCP broadcast requests.

 The function that receives this DHCP client request and relays it to a DHCP server on another network is called a DHCP relay agent.

 Using this function eliminates the need to install a DHCP server for each network. There are several ways to implement this functionality in your network.

The first method is to prepare a server that relays DHCP.

The second method is to set up a relay agent on the router.

 Either method registers the IP address of the DHCP server. The DHCP relay agent then converts the broadcast DHCP message to unicast and relays it to the DHCP server.

 By using this DHCP relay agent function, even if the network is divided by routers, a single DHCP server can automatically configure network information such as IP addresses.

Implement DHCP relay on the server (installation)

Here, we will introduce the procedure for implementing the DHCP relay agent function on a Windows server.

Windows servers have DHCP relay agent functionality.

Enable this feature in Administrative Tools under Routing and Remote Access.

I will introduce the flow of the procedure.
*For Windows Server 2003
*The DHCP server and DHCP relay agent cannot be installed on the same computer.

1. Launch “Routing and Remote Access”. Right-click the server name and select Configure and Enable Routing and Remote Access from the menu.

2. The setup wizard will start. Select Custom Configuration and click Next.

3. Select Custom Configuration and click Next.

4. Select the service according to your usage environment. Here, select “LAN Routing” and click “Next”.

5. Click “Finish” to complete the wizard.

6. “Routing and Remote Access Service” will be installed. Select Yes to start the service.

7. Under “Routing and Remote Access”, right-click “General” under “IP Routing” and select “New Routing Protocol” from the menu.

8. A list of routing protocols is displayed. Select DHCP Relay Agent and click OK.

This completes the DHCP relay agent installation.

Implement DHCP relay on server (setting)

1. Under Routing and Remote Access, expand IP Routing, right-click DHCP Relay Agent, and select New Interface.

2. Select the network interface you want to accept DHCP requests from and click the OK button.

3. Enter the required items in “DHCP relay properties”.

 Set whether to relay DHCP packets, hop count threshold (maximum number of steps to relay), and wait time (default is 4 seconds). There is no particular problem with the default settings, but here we will set the number of hops to 1.

4. Under Routing and Remote Access, expand IP Routing, right-click DHCP Relay Agent, and select Properties.

Specifies the IP address of the DHCP server.

5. Specifies the IP address of the DHCP server.

6. Click OK.

 In this way, Windows servers have the “DHCP relay agent” function, and you can easily prepare a DHCP relay agent.

 However, a server equipped with a relay agent function must be prepared for each network, resulting in an increase in the number of maintenance devices and a burden on operation management.

The DHCP relay function can also be performed by routers. You can solve this problem by implementing a DHCP relay function in your router.

Implement DHCP relay function on router

The DHCP relay function can be implemented by configuring routers and layer 3 switches as well.

This mechanism is shown below.

 When a router receives a DHCP request (broadcast), it unicasts the DHCP request to a DHCP server on another network.

 By using the router’s DHCP relay agent function, network setting information for multiple networks can be managed by a single DHCP server.

 In terms of operation management, the number of devices that must be maintained does not increase, making operation easier. In terms of cost, there is also the advantage of being inexpensive because there is no need to prepare a separate server.