Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Delaying DHCP Offer and Advertise Responses to Load Balance DHCP Servers

Load Balancing DHCP Local Servers by Delaying Responses to Clients

In a network environment with multiple DHCP local servers and numerous DHCP clients, you might want to load balance traffic by allowing some local servers to respond to specific clients while preventing other local servers from responding immediately to these clients. Starting in Junos OS Release 16.1R1, you can configure a client-specific delay in response on DHCP local servers. When a DHCPv4 client sends a discover message or a DHCPv6 client sends a solicit message to the server network, all the corresponding (Same family) DHCP servers on the network receive the request at the same time, but servers that are configured with a delay do not respond to the client until the delay timer expires.

When the delay timer expires, the local server sends an offer or advertise message to the client. If the client is already bound, that means that a different server, one that has either no delay or a shorter delay, responded with an offer or advertise message to the client. In this case the server configured with the delay releases the client.

However, if the client does not receive a response from any server, it sends a second discover or solicit message. If the configured server receives the second message from the client before the original delay times out, it immediately sends a response to the client. This behavior enables the configured server to act as a redundant or back-up server for the server that was intended to handle the client.

Table 1 lists the characteristics that you can use to identify DHCP clients for which responses are delayed and the corresponding DHCPv4 and DHCPv6 options you specify in the configuration.

Table 1: Characteristics to Identify Clients for Delayed Responses

Client Characteristic

DHCPv4

DHCPv6

Agent Circuit ID—A string that identifies the local circuit between the client and the DHCP relay agent, uniquely identifying the particular client.

Option 82, suboption 1

Option 18

Agent Remote ID—A string that uniquely identifies a client based on characteristics of the client, such as caller ID or user name.

Option 82, suboption 2

Option 37

User Class Identifier—A string representing a class or group to which the client belongs. For example, different user classes might identify a marketing group versus an accounting group.

Option 77

Option 15

Vendor Class Identifier—The IANA registered enterprise number for the vendor of the equipment running the client.

Option 60

Option 16

Benefits to Delaying DHCP Local Server Response

  • Enable load to be distributed among many DHCP servers by causing certain clients to be preferably served by other servers.

  • Enable redundancy among servers by allowing a server to respond in the event the preferred server does not.

Configuring a Delay in Local Server Response to DHCP Discover and Solicit Messages

You can configure a DHCPv4 or DHCPv6 local server to delay responding to discover and solicit messages, respectively, from clients. The server responds to the client only when the delay timer expires. You can configure the delay at global, group, and interface levels. To determine which clients are sent a delayed response, configure the server to identify specific hexadecimal or ASCII strings received in the message from the client. The local server compares the configured string with the value received DHCP options in the client message and delays the response depending on whether the received value matches the configured value, does not match it, or starts with the configured value.

To configure a delayed response to an offer message received from a DHCPv4 client:

Note:

This procedure shows the global configuration. You can also configure the delay at the [edit system services dhcp-local-server group group-name interface interface-name overrides] and [edit system services dhcp-local-server group group-name overrides] hierarchy levels.

  1. Specify how long the DHCPv4 local server delays before responding to the client.
  2. Specify the option received in the DHCPv4 offer message that identifies the client to receive a delayed response.
  3. Specify how to match the received option.
    • Match when the received ASCII or hexadecimal string is exactly the same as the configured string.

    • Match when the received ASCII or hexadecimal string is not exactly the same as configured string.

    • Match when the received ASCII or hexadecimal string starts with the configured string.

To configure a delayed response to an advertise message received from a DHCPv6 client:

Note:

This procedure shows the global configuration. You can also configure the delay at the [edit system services dhcp-local-server dhcpv6 group group-name interface interface-name overrides] and [edit system services dhcp-local-server dhcpv6 group group-name overrides] hierarchy levels.

  1. Specify how long the DHCPv6 local server delays before responding to the client.

  2. Specify the option received in the DHCPv6 advertise message that identifies the client to receive a delayed response.

  3. Specify how to match the received option.

    • Match when the received ASCII or hexadecimal string is exactly the same as the configured string.

    • Match when the received ASCII or hexadecimal string is not exactly the same as configured string.

    • Match when the received ASCII or hexadecimal string starts with the configured string.

Release History Table
Release
Description
16.1R1
Starting in Junos OS Release 16.1R1, you can configure a client-specific delay in response on DHCP local servers.