A DHCP relay agent is a router or computer that is configured to listen for DHCP or BOOTP broadcast from DHCP clients and then relay those messages to DHCP servers on different subnets.
DHCP clients use broadcasts from a DHCP server to secure a lease. Network routers do not pass broadcasts, unless they are specifically configured to do so. his means that a DHCP server can normally provide IP addresses to clients which are located on the same subnet.
Many organizations want to centralize their DHCP servers, as they find it easier to manage. These organizations must configure their network so that DHCP broadcasts will be passed from the client to the DHCP server. This can be done in any of the two ways: by configuring the routers which connect the subnets to forward DHCP broadcasts, or by configuring DHCP Relay Agents. The Routing and Remote Access Service under Microsoft Windows is able to function as a DHCP relay agent.
DHCP Relay Agent vs. Dual DHCP Servers
To provide fault tolerance, you should have at least two responders to DHCP client requests on every subnet.
If you have two or more subnets, you can use DHCP relay agents to provide fault tolerance and to keep management overhead at a minimum. For this, you should assign a DHCP server to each subnet, and then create non overlapping scopes for both subnets on both servers. Then you should deploy a DHCP relay agent on each subnet that is configured to forward packets, with a slight delay; to the DHCP sever in another subnet. This configuration will allow you to designate one DHCP server as the primary responder to DHCP requests, and to provide a backup route to another server if needed.
How a DHCP Relay Agent Works
The following steps describe how a DHCP relay agent works:
The DHCP client broadcasts a DHCPDISCOVER packet.
The DHCP relay agent on the client's subnet forwards the DHCPDISCOVER message to the DHCP server by using unicast.
The DHCP server uses unicast to send a DHCPOFFER message to the DHCP relay agent.
The DHCP relay agent broadcasts the DHCPOFFER packet to the DHCP client's subnet.
The DHCP client broadcasts a DHCPREQUEST packet.
The DHCP relay agent on the client's subnet forwards the DHCPREQUEST message to the DHCP server by using unicast.
The DHCP server uses unicast to send a DHCPACK message to the DHCP relay agent.
The DHCP relay agent broadcasts the DHCPACK to the DHCP client's subnet.
Using the Microsoft DHCP Server as a DHCP Relay Agent
Configuring a DHCP Relay Agent
Open Routing and Remote Access console.
Right click the server, and then click Configure and enable Routing and Remote Access.
On the welcome page to Routing and Remote Access setup wizard page, click next.
On the configuration page, select custom configuration, and then click next.
On the custom configuration page, select LAN routing, and then click next.
On the completing Routing and Remote Access setup wizard page, click finish.
In Routing and Remote Access warning dialog box, click yes to start the service.
On the remote access/VPN server page, click finish.
In the options of console tree, expand the server, expand IP routing, and then select general.
Right click general tab, and click the new routing protocol.
In the new routing protocol page, click the DHCP Relay Agent and click Ok.
Configuring a DHCP Relay Agent with the IP address of the DHCP server
Open Routing and Remote Access console.
In the options of console tree, select DHCP relay agent.
Right click the DHCP relay agent, click properties.
On general tab, server address field, type IP address of the DHCP server that you wish to forward DHCP request to, click add, then click Ok.
Enabling the DHCP Relay Agent on a Interface of Router
Open Routing and Remote Access console.
In the options of console tree, select DHCP relay agent.
Right click the DHCP relay agent, click new interface.
Select the interface on which you want to enable the DHCP relay agent, and then click Ok.
In the properties dialog box of DHCP relay agent general tab, make sure that relay DHCP packet is selected.
Configure the boot threshold (seconds) and hop count threshold, if needed, and then click Ok
The Dynamic Host Configuration Protocol (DHCP) is a set of rules used by communications devices such as a computer, router or network adapter to allow the device to request and obtain an IP address from a server which has a list of addresses available for assignment.
DHCP is a protocol used by networked computers (clients) to obtain IP addresses and other parameters such as the default gateway, subnet mask, and IP addresses of DNS servers from a DHCP server. The DHCP server ensures that all IP addresses are unique, e.g., no IP address is assigned to a second client while the first client's assignment is valid (its lease has not expired). Thus IP address pool management is done by the server and not by a human network administrator.
DHCP emerged as a standard protocol in October 1993. DHCP is a successor to the older BOOTP protocol, whose leases were given for infinite time and did not support options. Due to the backward-compatibility of DHCP, very few networks continue to use pure BOOTP. As of 2006, RFC 2131 (dated March 1997) provides the latest DHCP definition. As of 2004, the latest non-standard of the protocol is RFC 3315 (dated July 2003), which describes DHCPv6 (DHCP in an IPv6 environment