• Now that we've answered the question of what a DHCP relay agent is, let's look at how to configure one on a Cisco router.

    PC1 Before the Relay

    Before configuring the relay, let's look at PC1:

    C:\> ipconfig
    
    FastEthernet0 Connection:(default port)
    
       Connection-specific DNS Suffix..: 
       Link-local IPv6 Address.........: FE80::2E0:F9FF:FE23:D3B5
       IPv6 Address....................: ::
       IPv4 Address....................: 0.0.0.0
       Subnet Mask.....................: 0.0.0.0
       Default Gateway.................: ::
                                         0.0.0.0

    No IPv4 address, no subnet mask, no default gateway. PC1 sent a DHCP DISCOVER, but the broadcast did not cross the router and never reached the server.

    Cisco router DHCP relay configuration with ip helper-address command

    Figure 1 – DHCP Relay Configuration on a Cisco Router

    The configuration is straightforward.

    Configuring a DHCP Relay Agent on Cisco Devices

    1. Access the router's configuration mode:

    R1# conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    1. Navigate to the interface connected to the local subnet (where the client resides):

    R1(config)# int G0/0
    1. Set the IP address of the DHCP server as the helper address:

    R1(config-if)# ip helper-address 192.168.2.2
    R1(config-if)# end

    The ip helper-address command enables the router to forward DHCP requests received on the interface to the server at 192.168.2.2.

    Answer the question below

    Which command enables a DHCP relay on a Cisco router?