DHCP Relay Agent

  • 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.

    DHCP DISCOVER broadcast blocked by router between different subnets without DHCP relay agent

    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.

    Diagram showing what is a DHCP Relay Agent in a network topology where R1 forwards DHCP Discover from PC1 to the DHCP server

    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:

    DHCP DISCOVER blocked by router without DHCP relay agent

    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.

    DHCP relay agent forwards DISCOVER to server as unicast across subnets

    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