How to Configure a DHCP Relay Agent in Windows Server

What is a DHCP Relay Agent?

By design, DHCP discover packets are network broadcasts (they do not have a specific destination IP address). Routers, by default, block all broadcast traffic to prevent network congestion. Therefore, if your DHCP Server is on VLAN 10, but a client computer connects to VLAN 20, the client’s broadcast will be blocked and it will never receive an IP address. A DHCP Relay Agent solves this by listening for broadcasts on the local subnet and directly forwarding them as unicast packets to the remote DHCP server.

Step 1: Install the Remote Access Role

In Windows Server, the DHCP Relay Agent feature is bundled inside the Routing and Remote Access (RRAS) role. Open Server Manager, launch the Add roles and features wizard, and select the Remote Access role. Under Role Services, check the box for Routing (which will automatically check DirectAccess and VPN). Complete the installation.

Step 2: Enable Routing and Remote Access

Open the Routing and Remote Access console from the Server Manager Tools menu. The server will initially have a red down-arrow indicating it is disabled.

Right-click the server name and select Configure and Enable Routing and Remote Access. In the wizard, choose Custom configuration, and on the next screen, check the box for LAN routing. Finish the wizard and start the service when prompted.

Step 3: Add the DHCP Relay Agent Protocol

In the RRAS console, expand your server name, and expand the IPv4 node. Right-click on General and select New Routing Protocol….

A list of available protocols will appear. Select DHCP Relay Agent and click OK. A new “DHCP Relay Agent” node will appear under the IPv4 section.

Step 4: Specify the Remote DHCP Server IP

The relay agent needs to know exactly where to send the intercepted broadcast packets. Right-click the new DHCP Relay Agent node and select Properties.

In the Server Address box, type the IP address of your centralized DHCP Server (e.g., 10.0.10.5) and click Add. If you have a secondary failover DHCP server, add its IP address here as well. Click OK.

Step 5: Bind the Agent to the Local Interface

Finally, you must tell the relay agent which network interface to “listen” on. This must be the network adapter that is physically connected to the subnet where the client computers reside.

Right-click the DHCP Relay Agent node again, and select New Interface…. Select the appropriate local network adapter (e.g., “Ethernet 2” or “VLAN20-Interface”) and click OK. Leave the default hop-count threshold at 4, and click OK again.

The Windows Server will now actively intercept DHCP requests on that subnet and securely forward them across the router to your centralized DHCP server.

Get the best tech tips delivered straight to your inbox.

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