The dhcp-server algorithm command is used to configure the algorithm for the DHCP server.
The undo dhcp-server algorithm command is used to restore the default configuration.
By default, the DHCPv4 server adopts the master/backup algorithm.
This command is supported only on the NetEngine 8000 F1A.
Parameter | Description | Value |
---|---|---|
master-backup |
Master backup algorithm. |
- |
loading-share |
Load balancing algorithm. |
- |
polling |
Polling algorithm. |
- |
check-loose |
In the polling scenario, if the keyword check-loose is specified, the server Identify (option54) in the DHCP OFFER is different from any dhcp-server in the dhcp-server group bound to the address pool selected when the user goes online. If the source IP address of the packet is the same as any dhcp-server in the dhcp-server group, the polling algorithm still takes effect. If the check-loose keyword is not specified or undo dhcp-server algorithm polling check-loose is configured, it indicates that the strict check is performed. When the serverIdentifyer is different from any dhcp-server in the dhcp-server group bound to the address pool selected when the user goes online, the polling algorithm does not take effect. |
- |
Usage Scenario
If loading-share is specified, you must also configure weights for DHCPv4 servers using the weight command. Otherwise, the **dhcp-server algorithm loading-share ** command fails to take effect. If more than one DHCPv4 server is configured for a DHCPv4 server group, run the dhcp-server algorithm loading command to specify one of the following algorithms:
Load balancing: The device balances the load among DHCPv4 servers based on the weights of the servers. Master/backup: The first configured DHCPv4 server functions as the master server, and the other servers are backup servers. Polling: The device sends DHCPv4 Request messages to all DHCPv4 servers and selects the server that first responds with an ACK message. Subsequent packets are sent only to the selected server, except the Request messages generated during SELECTING state and Discover messages. If check-loose is specified, loose checks are performed. If the IP address carried in the Option 54 (server identifier) field of a DHCPv4 Offer message differs from that of any DHCPv4 server in the DHCPv4 server group bound to the address pool used for address assignment for user login but the source IP address carried in the Offer message is the IP address of any DHCPv4 server in the server group, the polling algorithm still takes effect. If **check-loose ** is not specified or the **undo dhcp-server algorithm polling check-loose ** command is run, strict checks are performed. The polling algorithm does not take effect if the IP address carried in the Option 54 (server identifier) field of a DHCPv4 Offer message differs from that of any DHCPv4 server in the DHCPv4 server group bound to the address pool used for address assignment for user login.Precautions
If the IP address of the gateway route is used as the source IP address and the DHCP server is configured with the polling mode:
<HUAWEI> system-view [~HUAWEI] dhcp-server group aa [~HUAWEI-dhcp-server-group-aa] dhcp-server algorithm polling check-loose
<HUAWEI> system-view [~HUAWEI] dhcp-server group aa [~HUAWEI-dhcp-server-group-aa] dhcp-server algorithm polling
<HUAWEI> system-view [~HUAWEI] dhcp-server group aa [~HUAWEI-dhcp-server-group-aa] dhcp-server algorithm master-backup
<HUAWEI> system-view [~HUAWEI] dhcp-server group aa [~HUAWEI-dhcp-server-group-aa] dhcp-server algorithm loading-share