DHCP Relay Agent

In this video from ITFreeTraining, I will look at the DHCP Relay Agent. A DHCP Relay Agent allows devices on the network that are not connected directly to the same network as the DHCP server to access the DHCP server. Let’s have a closer look.

Show lesson content
DHCP Relay Agent
In this example, the main network has its one and only DHCP server. This DHCP server distributes network configuration to devices on the network. This works well, however, what happens when you have a smaller network on a different subnet connected by a router.

By default, broadcasts do not travel between networks. When a devices requests configuration from a DHCP server, the first message that it sends on the network is a broadcast packet. All devices on that network will hear the broadcasts, however, the router will not retransmit the broadcast between networks. For this reason, the DHCP server will not hear the broadcast.

The administrator has two choices when this occurs. The administrator will either deploy a DHCP server on the network or configure a DHCP Relay Agent. Later in the video I will look at why the administrator may choose to deploy a relay agent, but before that, I will first look at how a DHCP Relay Agent works.

How a DHCP Relay Works
Consider that the main network has the DHCP server. On a second network is a device. The network is connected by a router that is not configured to forward broadcasts; I will look into this more later in the video.

The device on the network wants to obtain network configuration, so it will send a DHCP request message on the network. This message is a broadcast so all devices on that network will hear it.

Since the DHCP server is on a different network it will not hear the broadcast and this is where the DHCP Relay comes into play. The DHCP Relay is installed on the same network as the device. Since it is on the same network it will hear the broadcast.

The DHCP Relay Agent simply forwards the DHCP request to the DHCP server. The DHCP server on receiving the request will send an offer back to the DHCP Relay Agent. The offer once received by the DHCP Relay Agent will be forwarded to the device.

Essentially the DHCP Relay Agent passes messages between the device and the DHCP server, thus allowing the DHCP messages to be transmitted to different networks. This requires a device to be configured for this purpose. The question is, could you also configure a router to perform this task?

Router Working as DHCP Relay
The answer is, yes you can. If your router supports it, the router can act as a DHCP Relay Agent forwarding DHCP messages on the network to the network with the DHCP server. The big question remains is, why would you do this? Most routers nowadays have DHCP server support, or a device could be set up on the network to provide this service. There are even lightweight free DHCP servers that can be installed on a desktop computer very easily and if all that failed you could configure the device with a static IP Address. The answer is, it comes down to control and cost.

Why Deploy a DHCP Relay?
In the first instance, if cost is not an issue, in a Windows environment you would deploy a Windows Server with DHCP. In some cases, this may not be feasible. Maybe your company does not want to pay the cost of deploying a Windows Server. For example, on a small network with only a few devices there is not much return on investment for the cost of the server and the license.

However, the administrator may still want to use a Windows Server to manage DHCP. The administrator is free to use other DHCP solutions. However, using Windows Server does integrate better with other services. For example, using services like Network Access Protection. At the end of the day, DHCP Relay nowadays generally gets deployed when the administrator has a need to save costs but still wants to integrate DHCP with other services.

That covers it for DHCP Relay. I hope to see you in other videos, from the DHCP course and other free courses from us. Until the next video, I would like to thank you for watching.

“Dynamic Host Configuration Protocol” https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#DHCP_relaying

Lesson tags: dhcp
Back to: DHCP > DHCP