Dynamic Host Configuration Protocol (DHCP) simplifies IP address assignment on your network.
But what happens when a DHCP server and a client reside on different subnets?
Normally, broadcast messages like DHCP requests do not cross routers.Figure 1 – DHCP Broadcast Blocked Across Subnets
This creates a problem for DHCP clients in remote networks because they cannot communicate with the DHCP server to obtain an IP address.
If you're wondering what is a DHCP relay agent, it's the component that solves exactly this problem. A relay agent intercepts DHCP requests from clients and forwards them to a DHCP server located in another subnet.
Figure 2 – DHCP Relay Agent Forwards the Request Across Subnets
As you can see here, R1 is the DHCP Relay that sends the DHCP message to the DHCP Server located in another subnet.
Let’s take a closer look at why and how a DHCP Relay Agent can solve this challenge.
Why We Need a DHCP Relay Agent
Consider this scenario:
Figure 3 – DHCP DISCOVER blocked by the router
A DHCP Client (PC1) in subnet 192.168.1.0/24 sends a DHCP DISCOVER broadcast message to obtain an IP address.
The router (R1) receives the request but because broadcast traffic cannot traverse routers, the message does not reach the DHCP server in subnet 192.168.2.0/24.
Without a DHCP Relay Agent, PC1 would remain unconfigured and unable to connect to the network. By configuring R1 as a relay agent, the DHCP request is forwarded to the server and the server’s response is relayed back to the client.
Overview: What Is a DHCP Relay Agent and How It Works
A DHCP Relay Agent is a service configured on layer 3 devices such as routers or Layer 3 switches. It listens for DHCP requests and forwards them as unicast messages to the DHCP server.
Figure 4 –DHCP relay agent forwards the request to the DHCP server
Once the DHCP server responds, the relay agent ensures that the response is forwarded back to the client.
Answer the question below
Now that we’ve answered the question what is a DHCP relay agent, let’s look at how to configure one on a Cisco router.
Figure 5 – DHCP Relay Configuration on a Cisco Router
The configuration is straightforward.
Configuring a DHCP Relay Agent on Cisco Devices
Access the router’s configuration mode:
R1> enable R1# configure terminal
2. Navigate to the interface connected to the local subnet (where the client resides):
R1(config)# interface GigabitEthernet0/0
3. Set the IP address of the DHCP server as the helper address:
40 % Complete: you’re making great progress
Unlock the rest of this lesson
If you’d like to continue your CCNA journey, create your free account now.
Access all free CCNA lessons
Practice with quizzes and level test
Progress tracking in your dashboard
Made by network engineers - CCNP certified
Create your Free Account1151 learners continued their CCNA journey this month