Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the process of configuring devices on IP networks. A DHCP Relay Agent is a crucial component in networks where the DHCP server is not on the same local subnet as the client devices. This article will guide you through the process of configuring a DHCP Relay Agent on a Windows Server.
Prerequisites
Before you begin, ensure you have:
- Administrative access to the Windows Server.
- A DHCP server configured and running on a different subnet.
- The Routing and Remote Access Service (RRAS) role installed on the Windows Server.
Step-by-Step Guide
Step 1: Install the RRAS Role
- Open Server Manager.
- Click on Manage > Add Roles and Features.
- In the Add Roles and Features Wizard, click Next until you reach the Select Server Roles page.
- Check the box for Remote Access and click Next.
- On the Select features page, click Next.
- On the Remote Access page, click Next.
- On the Select role services page, check the box for Routing and click Next.
- Click Install and wait for the installation to complete.
Step 2: Configure RRAS for DHCP Relay
- Open Server Manager.
- Click on Tools > Routing and Remote Access.
- In the Routing and Remote Access console, right-click on the server name and select Configure and Enable Routing and Remote Access.
- In the Routing and Remote Access Server Setup Wizard, click Next.
- Select Custom configuration and click Next.
- Check the box for LAN routing and click Next.
- Click Finish and then click Start service when prompted.
Step 3: Enable DHCP Relay Agent
- In the Routing and Remote Access console, expand the server name, expand IP Routing, and then right-click on General.
- Select New Routing Protocol.
- In the New Routing Protocol dialog box, select DHCP Relay Agent and click OK.
Step 4: Configure the DHCP Relay Agent
- In the Routing and Remote Access console, right-click on DHCP Relay Agent under IP Routing and select New Interface.
- Select the network interface that will listen for DHCP requests and click OK.
- In the DHCP Relay Properties dialog box, check the box for Relay DHCP packets.
- Click on the General tab, and then click Add to add the IP address of the remote DHCP server.
- Enter the IP address of the DHCP server and click OK.
- Click OK to close the DHCP Relay Properties dialog box.
Verification
To verify that the DHCP Relay Agent is working correctly, you can use the following commands in Command Prompt or PowerShell:
# Display the IP configuration to ensure the relay agent is configured correctly
ipconfig /all
# Check the status of the RRAS service
Get-Service -Name RemoteAccess
# Display the routing table to ensure routes are correctly configured
route print
Conclusion
By following these steps, you can successfully configure a DHCP Relay Agent on a Windows Server. This setup ensures that devices on different subnets can still receive IP addresses from a centralized DHCP server, enhancing the efficiency and manageability of your network.