How to Configure a DHCP Relay Agent in Windows Server

Why Use a DHCP Relay Agent?

In a routed network with multiple subnets, broadcast traffic (like DHCP discover packets) is naturally dropped by routers. If you have a centralized DHCP server on one subnet, clients on other subnets cannot obtain IP addresses directly. A DHCP Relay Agent solves this by listening for client broadcasts and forwarding them as unicast packets directly to the central DHCP server.

Step 1: Install the Routing and Remote Access Role

To configure a DHCP Relay Agent in Windows Server, you must install the Remote Access role. Open the Server Manager and click Add roles and features. Navigate through the wizard to the Server Roles page, check the box for Remote Access, and proceed to the Role Services page. Select Routing (which will automatically check DirectAccess and VPN) and complete the installation.

Step 2: Initialize Routing and Remote Access

Once installed, open the Routing and Remote Access console from the Server Manager Tools menu. Right-click your server name in the left pane and select Configure and Enable Routing and Remote Access.

In the setup wizard, choose Custom configuration, click Next, and then select LAN routing. Finish the wizard and start the service when prompted.

Step 3: Add the DHCP Relay Agent Protocol

In the Routing and Remote Access console, expand your server name, expand IPv4, and right-click on General. Select New Routing Protocol…. From the list of available protocols, choose DHCP Relay Agent and click OK. A new “DHCP Relay Agent” node will appear under IPv4.

Step 4: Configure the Relay Agent Properties

Right-click the newly added DHCP Relay Agent node and select Properties. Here, you must specify the IP address of your central DHCP server. Enter the IPv4 address of the server that holds your DHCP scopes and click Add, then click OK.

Step 5: Bind the Relay Agent to the Interface

The relay agent needs to know which network interface it should listen on for incoming client DHCP broadcasts. Right-click the DHCP Relay Agent node again and select New Interface…. Select the network interface that connects to the subnet where your clients reside (the subnet without a local DHCP server). Click OK.

In the properties dialog that appears for that interface, ensure Relay DHCP packets is checked and the Hop-count threshold is set appropriately (usually 4 is sufficient). Click OK. Your Windows Server is now actively relaying DHCP requests across subnets.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.