• Main Menu
  • DHCP Relay Agents


    The Dynamic Host Configuration Protocol (DHCP) is a service that runs at the application layer of the TCP/IP protocol stack to dynamically assign IP addresses to DHCP clients, and to allocate TCP/IP configuration information to DHCP clients. This includes subnet mask information, default gateway IP addresses, DNS IP addresses, and WINS IP addresses. The DHCP protocol is derived from the Bootstrap Protocol (BOOTP) protocol. The DHCP server is configured with a predetermined pool of IP addresses (scopes), from which it allocates IP addresses to DHCP clients. During the boot process, DHCP clients request IP addresses, and obtain leases for IP addresses from the DHCP server.

    When the DHCP client boots up on the network, the DHCP lease process occurs between the DHCP server and DHCP client. During the DHCP lease process, the DHCP scopes configured for a DHCP server is used to provide DHCP clients with IP addresses.

    The DHCP lease process consists of four messages sent between the DHCP server and the DHCP client:

    • DHCPDISCOVER message: This message is sent by a client when it boots up on the network to request an IP address lease from a DHCP server. The message is sent as a broadcast packet over the network, requesting for a DHCP server to respond to it.
    • DHCPOFFER message: This message is a response to a DHCPDISCOVER message, and is sent by one or numerous DHCP servers.DHCP Relay Agents
    • DHCPREQUEST message: The client sends the initial DHCP server which responded to its request a DHCP Request message. The message indicates that the client is requesting the particular IP address for lease.
    • DHCPACK message: The DHCP Acknowledge message is sent by the DHCP server to the DHCP client and is the process whereby which the DHCP server assigns the IP address lease to the DHCP client.

    Because the DHCPDISCOVER message is a broadcast message, and broadcasts only cross other segments when they are explicitly routed, you might have to configure a DHCP Relay Agent on the router interface so that all DHCPDISCOVER messages can be forwarded to your DHCP server. Alternatively, you can configure the router to forward DHCP messages and BOOTP message. In a routed network, you would need DHCP Relay Agents if you plan to implement only one DHCP server.

    For DHCP to operate, all of client computers should be able to contact the DHCP server. DHCP relies on the network topology, and is in turn relied on by all TCP/IP based hosts within your networking environment. Therefore, if your network has multiple segments, you have to perform either of the following:

    • Place a DHCP server on each segment.
    • Place a DHCP Relay Agent on each segment.
    • Configure your routers to forward broadcast messages.

    The DHCP Relay Agent makes it possible for DHCP broadcast messages to be sent over routers that do not support forwarding of these types of messages. The DHCP Relay Agent is therefore the routing protocol that enables DHCP clients to obtain IP addresses from a DHCP server on a remote subnet, or which is not located on the local subnet. If you have no configured DHCP Relay Agent, your clients would only be able to obtain IP addresses from the DHCP server which is on the same subnet. To enable clients to obtain IP addresses from a DHCP server on a remote subnet, you have to configure the DHCP Relay Agent on the subnet that contains the remote clients, so that it can relay DHCP broadcast messages to your DHCP server.

    The systems that can use the DHCP Relay Agent are:

    • Windows NT Server.
    • Windows 2000 Server.
    • Windows Server 2003.

    In routed networks, you need to either enable your routers to forward DHCP broadcast messages or configure a DHCP Relay Agent for the following reasons:

    • The router will drop DHCP broadcast messages if it is not configured to forward them, and no DHCP Relay Agent exists.
    • The DHCP lease process would not be able to place. The initial message sent by the DHCP client is a broadcast message.

    Configuring the DHCP Relay Agent

    The process for configuring the DHCP Relay Agent is outlined below:

    • Enable Routing and Remote Access Server (RRAS).
    • Install the DHCP Relay Agent routing protocol.
    • Configure DHCP Relay Agent properties.
    • Configure/enable the DHCP Relay Agent on the router interface to forward DHCP broadcast messages.
    • View statistical information on the operation of the DHCP Relay Agent.

    How to enable Routing and Remote Access Server (RRAS):

    1. Click Start, All Programs, Administrative Tools and then click Routing and Remote Access to open the Routing And Remote Access console.
    2. Right-click the node of your server, and then choose Configure And Enable Routing and Remote Access from the shortcut menu.
    3. The Routing and Remote Access Server Setup Wizard launches.
    4. Click Next on the initial page of the wizard.
    5. On the Configuration page, select the Custom Configuration option. Click Next.
    6. On the Custom Configuration page, enable the LAN Routing checkbox. Click Next.
    7. Verify your configuration settings on the Summary page.
    8. Click Finish.
    9. Click Yes when prompted to start the RRAS service.

    How to install the DHCP Relay Agent routing protocol:

    1. Open the Routing And Remote Access console.
    2. Expand the IP Routing node in the console tree.
    3. Right-click the General node, and then select New Routing Protocol from the shortcut menu.
    4. The New Routing Protocol dialog box opens.
    5. Select DHCP Relay Agent.
    6. Click OK.

    How to configure DHCP Relay Agent properties:

    1. Click Start, All Programs, Administrative Tools and then click Routing and Remote Access to open the Routing And Remote Access console.
    2. Expand the IP Routing node in the console tree.
    3. Right-click the DHCP Relay Agent node, and then select Properties from the shortcut menu.
    4. On the General tab, enter the IP address of the DHCP server in the Server Address text box, and click Add.
    5. Repeat the above step for each DHCP server that you have to add.
    6. Click OK.

    How to enable the DHCP Relay Agent on a router interface:

    1. Click Start, All Programs, Administrative Tools and then click Routing and Remote Access to open the Routing And Remote Access console.
    2. Expand the IP Routing node in the console tree.
    3. Right-click the DHCP Relay Agent node and then select New Interface from the shortcut menu.
    4. Select the interface that is on the same subnet as the DHCP clients.
    5. Click OK.
    6. In the DHCP Relay Properties dialog box, ensure that the Relay DHCP Packets checkbox is selected on the General tab.
    7. You can change the Hop-Count Threshold and Boot Threshold values.
    8. Click OK.

    How to view statistical information on the operation of the DHCP Relay Agent:

    1. Click Start, All Programs, Administrative Tools and then click Routing and Remote Access to open the Routing And Remote Access console.
    2. Select the DHCP Relay Agent node, and view the statistical information that is displayed in the details pane of the Routing And Remote Access console:
      • Received requests
      • Received replies
      • Discarded requests
      • Discarded replies

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    4 comments
    1. Sofia Lucifairy

      16 February, 2014 at 8:10 pm

      Very useful article, thank you for writing it, it helped me understand dhcp relaying much better!

      Reply
    2. Rashid Khan

      18 June, 2011 at 8:03 pm

      Hi,

      I am trying to configure VPN on Windows Server 2008 R2 but when i install RRAS it tells me that i need to configure DHCP relay agent as well. I have two NICs on different subnets.

      The same server is also running DHCP server. I have tried configuring the DHCP relay agent but the VPN access does not work. Also after installing RRAS the local IIS access stops working and users cannot access the local on premise Dynamics CRM 2011 server (also installed on the same server).

      Can you please offer some guidance?

      Kind regards,
      Rashid Khan

      Reply
      • Bhomas

        21 July, 2011 at 7:41 am

        The DHCP relay agent can’t run on a Windows Server 2008 that also is running the DHCP Server service or network address translation (NAT) with automatic addressing enabled.

        Reply
    3. Clark Phillips

      11 January, 2011 at 10:05 pm

      Misspelled “Reasons” — See the sentence below:

      In routed networks, you need to either enable your routers to forward DHCP broadcast messages or configure a DHCP Relay Agent for the following resons:

      I found the information in this article to be very informative. The only comment that I have is concerning the following:

      The systems that can use the DHCP Relay Agent are:

      * Windows NT Server
      * Windows 2000 Server
      * Windows Server 2003

      To my knowledge, “DHCP Relay Agent” must be some software that only runs on Windows based on this statement. Although this may be true… the phrase “DHCP Relay Agent” seems pretty generic such that it is NOT specific to an OS.

      Reply
    Microsoft DHCP
    180 queries in 0.506 seconds.