The dhcp server next-server command specifies a server IP address for DHCP clients.
The undo dhcp server next-server command cancels the configuration.
By default, no server IP address is specified by the DHCP Server for DHCP clients.
Parameter |
Description |
Value |
---|---|---|
ip-address |
Specifies a server IP address. |
The value is in dotted decimal notation. |
Usage Scenario
The dhcp server next-server command is used on DHCP servers. When assigning a DHCP client an IP address, a DHCP server can also assign the DHCP client an IP address of the server that provides network services for the client. For example, some clients like IP phones still need other configuration parameters after automatically obtaining IP addresses. You can run the dhcp server next-server command to specify the server address used after a client obtains an IP address. The client then requests the configuration parameters from the specified server after obtaining an IP address.
If users use addresses in the interface address pool, run the dhcp server next-server command to specify the DHCP server IP address. If users use addresses in the global address pool, run the next-server command to specify the DHCP server IP address.
Prerequisites
IP addresses in the interface address pool have been configured using the ip address command.
The DHCP server function has been enabled on the interface using the dhcp select interface command.
Precautions
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ip address 10.1.1.2 24 [HUAWEI-Vlanif100] dhcp select interface [HUAWEI-Vlanif100] dhcp server next-server 192.168.1.2
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ip address 10.1.1.2 24 [HUAWEI-GigabitEthernet0/0/1] dhcp select interface [HUAWEI-GigabitEthernet0/0/1] dhcp server next-server 192.168.1.2