dhcp-server

Function

The dhcp-server command configures the IP address of a DHCPv4 server and configures the weight of a specified DHCPv4 server when it performs load balancing. A DHCPv4 server group contains a maximum of eight DHCPv4 servers.

The undo dhcp-server command removes the DHCPv4 server(s). If you do not use any parameter, all DHCPv4 servers in the DHCPv4 server group are removed.

By default, the IP address of a DHCPv4 server and the weight of a specified DHCPv4 server is not configured.

This command is supported only on the NetEngine 8000 F1A.

Format

dhcp-server ip-address [ vpn-instance vpn-instance ] [ weight weight-value ]

undo dhcp-server [ ip-address [ vpn-instance vpn-instance ] ]

Parameters

Parameter Description Value
ip-address

Specifies the IP address of the DHCPv4 server in the dotted decimal format.

The value is in the dotted decimal format.

vpn-instance vpn-instance

Specifies the VPN instance name.

The value is a string of 1 to 31 characters. The instance must be a configured VPN instance.

weight weight-value

Specifies the weight of a DHCPv4 server.

The value is an integer that ranges from 0 to 100. The default value is 5.

Views

DHCP group view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

1.The weight configured using the dhcp-server command takes effect only when two (or up to eight) DHCPv4 servers in a DHCPv4 server group work in load balancing mode. To specify the working mode of the DHCPv4 servers in a DHCPv4 server group, run the dhcp-server algorithm command.The dhcp-server command sets the weight of a DHCPv4 server that works in load balancing mode rather than the priority of the DHCPv4 server. Packets are distributed to multiple servers based on their weights. No default weight is configured. If no weight is configured, the weights of multiple servers are the same.2.By default, servers in a DHCPv4 server group work in active/standby mode. The DHCPv4 server with the first index is used as the active server. After the active server is deleted, the newly configured server is allocated to the original smaller idle index. In this case, the newly configured server is used as the active server.

Precautions

In VS mode, this command is supported only by the admin VS.

Example

# Add a DHCPv4 server to the DHCPv4 server group remote, set its IP address to 1.2.3.4, and specify its weight as 20.
<HUAWEI> system-view
[~HUAWEI] dhcp-server group remote
[*HUAWEI-dhcp-server-group-remote] dhcp-server 1.2.3.4 weight 20
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >