Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Number of DHCP Clients Per Interface

Specifying the Maximum Number of DHCP Clients Per Interface

By default, there is no limit to the number of DHCP local server or DHCP relay clients allowed on an interface. However, you can override the default setting and specify the maximum number of clients allowed per interface, in the range 1 through 500,000. When the number of clients on the interface reaches the specified limit, no additional DHCP Discover PDUs or DHCPv6 Solicit PDUs are accepted. When the number of clients subsequently drops below the limit, new clients are again accepted.

Note:

The maximum number of DHCP (and DHCPv6) local server clients or DHCP (and DHCPv6) relay clients can also be specified by Juniper Networks VSA 26-143 during client login. The VSA-specified value always takes precedence if the interface-client-limit statement specifies a different number.

If the VSA-specified value differs with each client login, DHCP uses the largest limit set by the VSA until there are no clients on the interface.

To configure the maximum number of DHCP clients allowed per interface:

  1. Specify that you want to configure override options.
    • For DHCP local server:

    • For DHCPv6 local server:

    • For DHCP relay agent:

    • For DHCPv6 relay agent:

  2. Configure the maximum number of clients allowed per interface. (DHCP local server, DHCPv6 local server, DHCP relay agent and DHCPv6 relay agent all support the interface-client-limit statement.)
Note:

For DHCP local server and DHCP relay agent, you can use either the interface-client-limit statement or the client-discover-match incoming-interface statement to set a limit of one client per interface. The interface-client-limit statement with a value of 1 retains the existing client and rejects any new client connections. The client-discover-match incoming-interface statement deletes the existing client and allows a new client to connect.

Allowing Only One DHCP Client Per Interface

Subscriber management provides two methods that you can use to configure DHCP local server and DHCP relay agent to allow only one DHCP client per interface. The two methods differ on which client is allowed on the interface—the new client or the existing client. The two methods are supported by both DHCP local server and DHCP relay agent, and can be configured globally, for a group of interfaces, or for a specific interface.

  • Accept new client—Delete the existing client binding and allow the new client to connect. To configure this action, use the ... overrides client-discover-match incoming-interface statement.

  • Keep existing client—Retain the existing client binding on the interface and reject any requests from new DHCP clients. To configure this action, use the ... overrides interface-client-limit 1 statement to specify a maximum of one client.

To configure the router to delete the existing client binding on the interface and allow the new client to connect:

  1. Specify that you want to configure override options.
    • For DHCP local server:

    • For DHCP relay agent:

  2. Configure the router to view all client connections on the interface as coming from the same client, which allows a new client to replace the existing client. This example shows the DHCP local server configuration. The DHCP relay agent configuration is similar.

To configure the router to keep the existing client binding on the interface and refuse connections from new clients:

  1. Specify that you want to configure override options.

    • For DHCP local server:

    • For DHCP relay agent:

  2. Set the maximum number of clients allowed per interface to one. This example shows the DHCP local server configuration. The DHCP relay agent configuration is similar.